Mai Content [mai_content] Shortcode

Display a reusable block, post, or page's content via a shortcode.

Here is an overview of how to use shortcodes.

Our [mai_content]shortcode is great for times you want to use blocks, but only the classic editor is available.

Here’s a typical use-case:

  1. Create a Reusable Block in Dashboard > Appearance > Reusable Blocks.
  2. Get the ID from the edit post URL. In post.php?post=1234 the ID is 1234. Or use the post slug.
  3. Add [mai_content id="1234"] or [mai_content id="my-post-slug"] to your field/editor.

id (required)

Accepts a post ID or slug. If you are using the slug for id then you need to specify the post_type parameter for anything besides reusable blocks.

[mai_content id="123"]
[mai_content id="my-reusable-block-slug"]

post_type

The registered post type name. Default is wp_block for Reusable Blocks. Others may be post, page, or any custom post type name.

[mai_content id="my-cpt-slug" post_type="my_cpt"]
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us