2

I want to show a discount bar just below navigation

  • Created a static block and placed my content inside it .
  • Called block using below code

{{block class="Magento\Cms\Block\Block" block_id="discount-bar"}}

Its appearing on front end but I want it to place just below navigation and then after my slider

I have gone through this Magento2 : display static blocks in home page

If possible without using XML then will be great help

Manoj Deswal
5,80325 gold badges29 silver badges50 bronze badges
asked Oct 23, 2017 at 11:01
2
  • Are you using default theme Commented Oct 23, 2017 at 11:12
  • luma extended , I mean custom theme based on luma Commented Oct 23, 2017 at 11:13

1 Answer 1

4

The easiest way to add static blocks on Homepage and setting there order is:

creating blocks and widgets

  • You need to create a widget , name it discount bar
  • select your static block ( discount-bar ) from widget options
  • Assign store view and set order for example " 1 "
  • Add layout update Display on specified page / Page: CMS HOME PAGE / Container: After page header

for more details you can check this https://magento.stackexchange.com/a/187029/54588

Note : Set order no in desired way , like in your case for discount bar " 1 " and for slider " 2 "

I hope this will help you in most easy way

answered Oct 23, 2017 at 11:20
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.