HTML blocks

HTML blocks are reusable content sections that you can build once and display in multiple locations across your website. They can contain text, images, products, forms, menus, or any other content supported by Gutenberg, Elementor, or WPBakery.

When you edit a published HTML block, every location that displays that block is updated automatically. This makes HTML blocks suitable for shared content such as footers, mega menus, promotional banners, product information, and sidebar sections.

Create an HTML block

  1. Navigate to Dashboard → HTML Blocks → Add Block.
  2. Enter a descriptive title and build the content with Gutenberg, Elementor, or WPBakery.
  3. Optionally assign an HTML Block Category to organize reusable content in the dashboard.
  4. Publish the block.
Woodmart HTML Blocks list with shortcode
The HTML Blocks list displays the shortcode for every published block.

The Shortcode column displays a reusable shortcode in the following format: [html_block id="123"]. Replace 123 with the ID shown for your block.

Insert an HTML block

Use an HTML Block selector

Many WoodMart controls provide a dedicated content type selector. Choose HTML Block, then select the published block from the search field. This is the preferred method whenever an HTML Block selector is available.

Insert the shortcode in page content

  • Gutenberg — add a Shortcode block and insert the shortcode from the HTML Blocks list.
  • Elementor — add the Shortcode widget and insert the HTML block shortcode.
  • WPBakery — add the WoodMart HTML Block element and select the required block.

Use fields that accept shortcodes

Some text fields do not have a dedicated HTML Block selector but process shortcodes. In these fields, insert the HTML block shortcode directly. Examples include Text next to copyrights, Empty cart text, and the message field of the age verification popup.

Header and navigation

Header Builder

Add the HTML Block element to a Header Builder row or column, then select the required block. The element can display content created with any supported page builder and is useful when the standard header elements do not provide the required structure.

Configure HTML Block settings in header builder
Selecting an HTML block in the Header Builder element.

Mega menu

An HTML block can provide the complete content of a mega menu. Assign it in the settings of the required WordPress menu item. See Create mega menu for the complete procedure for Gutenberg, Elementor, and WPBakery.

Dropdown settings for the Furniture category, showing the selected HTML block
Assigning an HTML block to a mega menu item.

Footer areas

The recommended footer method is to select HTML Block under Dashboard → Theme Settings → Footer and assign one reusable block containing the complete footer structure. See Set up the footer for detailed instructions.

If the footer uses WordPress widgets, add the WOODMART HTML Block widget to a footer column or another sidebar and select the required block.

HTML Block in widget
Displaying an HTML block through a footer widget area.

For content above the footer, navigate to Dashboard → Theme Settings → Footer → Prefooter, set Prefooter content to HTML Block, and select the block.

Theme settings page showing the Prefooter footer block selected
HTML block selected as prefooter content.

The Text next to copyrights field under Dashboard → Theme Settings → Footer → Copyrights accepts shortcodes and can display an HTML block beside the copyright text.

Theme options page showing copyright text and a shortcode in the text next to copyrights field
Using an HTML block shortcode next to the copyright text.

Banners and popup content

Header banner

Navigate to Dashboard → Theme Settings → General → Header banner, enable Header banner, set Banner content to HTML Block, and select the required block.

Banner content HTML Block
Using an HTML block as header banner content.

Popups

For new custom popups, use the Popup builder. The legacy promo popup remains available under Dashboard → Theme Settings → General → Promo popup and supports an HTML Block content type.

Promo popup content HTML BLock
HTML block content in the legacy promo popup settings.

The age verification popup does not have a separate HTML Block selector. Insert the HTML block shortcode into Popup message under Dashboard → Theme Settings → General → Age verify popup. Match the popup Text color scheme to the colors used in the block.

Age verify popup settings page
Displaying an HTML block in the age verification popup message.

WooCommerce locations

Cart and thank you page

The Empty cart text field under Dashboard → Theme Settings → Shop → Cart accepts the HTML block shortcode. Use it to add reusable buttons, links, banners, or other content to the empty cart page.

Cart settings page with layout options, auto-update toggle, and empty cart text field
Using an HTML block in the empty cart content.

Under Dashboard → Theme Settings → Shop → Thank you page, set Extra content for “Thank you page” to HTML Block and select the block. The separate Default “Thank you page” content option controls whether the standard WooCommerce order details remain visible.

Thank you page content HTML Block
Selecting reusable content for the thank you page.

Content around the Add to cart button

Navigate to Dashboard → Theme Settings → Single product → Add to cart. Both Before “Add to cart button” and After “Add to cart button” support the HTML Block content type.

Before and after comparison of the Add to cart button content block
Reusable content placed around the Add to cart button.

Product tabs

Global legacy tabs and product-specific custom tabs can use HTML Blocks. See Custom tabs for current configuration methods and the difference between global and individual tabs.

Legacy tabs content with HTML Blocks
Selecting an HTML block for a global legacy product tab.
HTML Blocks on single product tabs frontend
Example of global HTML block content displayed in a product tab.
Tabs settings panel with fields for custom tab title, priority, and content editor
Assigning an HTML block to a product-specific custom tab.

Product and taxonomy extra content

An individual product can display a selected Extra content block before its content, after its content, or in the prefooter position. See Product page configuration for the current product editing workflow.

Product categories and attributes provide an Extra description content type. Choose HTML Block and select a block to display it after the product loop. For other taxonomy description fields that process shortcodes, insert the HTML block shortcode directly.

WordPress category edit form showing the description field html block
Shortcode-based HTML block content in a taxonomy description.

Widgets and sidebars

Add the WOODMART HTML Block widget to any registered widget area under Dashboard → Appearance → Widgets. Select the reusable block in the widget settings. For example, an HTML block containing a Product filters element can be displayed in a shop sidebar. See Create a product filters form for filter configuration.

WordPress widgets editor showing a WOODMART HTML block
Displaying an HTML block through a sidebar widget.

Mobile page content

To replace a page’s regular content on mobile devices, create the mobile content as an HTML block and select it under the page’s Mobile version settings. See Page settings for the standard editor and Elementor workflows.

Woodmart page settings showing the Mobile version settings panel
Selecting an HTML block as the mobile version of a page.

Related documentation

Don’t miss WoodMart updates

Receive feature updates, tutorials, and WoodMart news via email.