aw2_module

This shortcode is used to call modules defined within Awesome Modules section. aw2_module is one of the few shortcode that is registered directly with WordPress and will work inside WordPress posts and pages.

Reusable modules, i.e modules that you load form our Awesome Studio parts are used using aw2_run instead of aw2_module.

attributes:
  • slug:
    You can specify slug of awesome module to load.

  • data:
    You can specify the slug of awesome data you want to load before loading the awesome page. It is optional

  • site_id:
    You can specify the ID of the site using site_id attribute, and the page will be loaded from that site, in a multisite environment. By default it is current site

  • asset:
    It allows you to call a asset directly from a module.

  • function:
    It allows you to execute a function directly from a module.

p.s remove the space between “[” and “aw2” in the examples below, they have been added to avoid their execution on this page.

Examples:

This is most common usage of aw2_module

We can use aw2_module along with data

We can use aw2_module to call a module asset

We can use aw2_module module function

In multisite environment aw2_asset can be used as