Keap
Also available forActiveCampaign

[memb_include_post]

Summary
Allows you to insert content or metadata from a post, page, or partial into the current position of the shortcode.

Description

Allows you to insert content or metadata from a post, page, or partial into the current position of the shortcode. The shortcodes [memb_include_post], [memb_include_page], and [memb_include_partial] are synonymous and have no real difference. You can identify the content by post ID or by title.

Shortcode Examples

Basic usage:

[memb_include_partial id=48]
[memb_include_post id=246]
[memb_include_page id=49]

Partial editor showing the post ID

Retrieving a specific field:

[memb_include_post id=46 field=post_date_gmt]

Applying text formatting:

[memb_include_post id=46 txtfmt=strtoupper]

Shortcode Parameters

idThe post ID (numeric), slug, or title of the content to include. (Required)
fieldThe post field to retrieve. Restricted to post_content, post_title, and post_excerpt. Default: post_content.
typePost type to include. Auto-detected from the shortcode tag: [memb_include_partial] uses 'partials', [memb_include_page] uses 'page', all others use 'post'.
lengthMaximum character length of the output. Uses balanced tag truncation. Set to 0 for no limit. Default: 0.
tagidComma-separated tag IDs. The contact must have at least one of the specified tags for the shortcode to display content.
bypass_permissionsSet to 1 to bypass access and publish checks. Default: 0.
txtfmtA comma-separated list of text processing functions to apply to the output.
captureCaptures the shortcode output and routes it to a variable for later use.

Additional Information

Take care not to recursively include pages. The default field to return is post_content. For security, only the following fields may be retrieved:

  • post_content
  • post_title
  • post_excerpt

Additional fields can be enabled via the memberium/shortcodes/include_post/allowed_fields filter.

Shortcode Attributes

ConditionalNo
NestableNo
Accepts formattingYes
CapturableNo