Go to

Categories overview

Rendering Blocks [adverts_block]

In version 2.0.4 we have introduced a [adverts_block] shortcode, you can use it to render WPAdverts blocks when building the website with some third-party page builder plugin like Elementor, Beaver Builder, Oxygen, or similar. It should actually work with any page builder that can execute shortcodes.

Shortcode Parameters

  • template_id – the ID (integer) of the template with a block to render
  • template_name – the URL-friendly name (slug) of the template

You only need to pass one of the params either the id or the name, where to get them from you can read below.

Using [adverts_block] shortcode

Using this shortcode is quite simple, you first need to go to the wp-admin / Pages panel, and create there a new page using Gutenberg (block) editor, in the content add and configure one or more of the available WPAdverts blocks and save the page as a draft.

The page will be your template, to easier identify it you can set the page slug to for example “template-search-and-list”.

Finally, you can go back to your page builder and use the shortcode as

[adverts_block template_name="template-search-and-list"]

You can watch the video below to see how to create a template with Search and List blocks and then display this template on a page build with the Elementor

Was this article helpful?