Magento2 CMS Block – How to Display on Product Page

admin-panelcms-blockmagento2

i already created cms block with image advertising

how to display cms block on product page in the lower part above the footer?

only use admin panel

Best Answer

Yeah, we can use the widget feature. To do that, take the following steps:

Step 1: Choose the type

  1. On the Admin sidebar, go to Content > Elements > Widgets.

  2. Click Add Widget.

  3. In the Settings section:

  • Set Type to CMS Static Block.

  • Verify that Design Theme is set to the current theme.

  1. Click Continue.

Step 2: Specify storefront properties and layout:

  1. In the Storefront Properties section:
  • For Widget Title, enter a descriptive title for the widget.

  • This title is visible only from the Admin.

  • For Assign to Store Views, select the store views where the widget will be visible.

    You can select a specific store view, or All Store Views. To select multiple views, hold down the Ctrl key (PC) or the Command key (Mac) and click each option.

  • (Optional) For Sort Order, enter a number to determine the order this item appears with others in the same part of the page. (0 = first, 1 = second, 3 = third, and so on.)

  1. In the Layout Updates section, click Add Layout Update.

  2. Set Display On to the type of page where it is to appear. For example, you can use All Product Types for all product types.

  3. In the Container list, choose Before Page Footer.

Step 3: Complete the widget options

  1. In the left panel, choose Widget Options.
  2. Click Select Block.
  3. Choose the block you need.

Step 4: Save and check the result

  1. When complete, click Save.
  2. Clear cache: Cache Types are invalidated: Blocks HTML output, Layouts, and Page Cache.

You're done.