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,785
  • 25
  • 27
  • 50

1 Answers1

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

Manoj Deswal
  • 5,785
  • 25
  • 27
  • 50