Home Plugins post content shortcode
Post Content Shortcode logo

Post Content Shortcode

by Herron on WordPress.org

Embed the content of another post using a simple shortcode. Useful for reusing content across pages or posts.

(0)
Settings page showing allowed post statuses.

Settings page showing allowed post statuses.

Post Content Shortcode allows you to display the content of any post using a shortcode like:

[post_content id=”123″]

This is useful for reusing content in multiple places, referencing another post inline, or including dynamically updated blocks of content.

You can configure which post statuses are allowed to be embedded from the plugin’s settings page under Settings Post Content Shortcode.

Usage

Use the shortcode like this:

[post_content id=”123″]

Where 123 is the ID of the post you want to embed.

To avoid infinite loops, the plugin prevents a post from including itself.

Only posts with selected statuses (e.g. Published, Draft) will be rendered. You can control this from the plugin settings page.

Customizing the Shortcode Tag

By default, the shortcode tag is post_content. You can change it by adding this to your theme’s functions.php file:

add_filter( ‘herron_pcs_shortcode_tag’, function( $tag ) {
return ‘my_custom_shortcode’;
});

After doing so, use the new tag:

[my_custom_shortcode id=”123″]

The settings page and all logic will automatically respect this change.

Active installations0+
Weekly downloads
10
Version1.0.1
Last updated6/29/2025
WordPress version5.0
Tested up to6.8.1
PHP version7.0
Tags
Content Blocksdynamic contentpost contentreusable contentshortcode