{"id":238801,"date":"2025-06-29T11:16:23","date_gmt":"2025-06-29T11:16:23","guid":{"rendered":"https:\/\/en-gb.wordpress.org\/plugins\/post-content-shortcode\/"},"modified":"2025-06-29T12:54:41","modified_gmt":"2025-06-29T12:54:41","slug":"post-content-shortcode","status":"publish","type":"plugin","link":"https:\/\/ast.wordpress.org\/plugins\/post-content-shortcode\/","author":23314313,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.1","stable_tag":"1.0.1","tested":"6.8.5","requires":"5.0","requires_php":"7.0","requires_plugins":null,"header_name":"Post Content Shortcode","header_author":"Herron","header_description":"Adds a simple shortcode to display the content of any post or page.","assets_banners_color":"fbfaf4","last_updated":"2025-06-29 12:54:41","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/herron.agency\/","header_author_uri":"https:\/\/herron.agency\/","rating":0,"author_block_rating":0,"active_installs":40,"downloads":508,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"herronagency","date":"2025-06-29 11:15:53"},"1.0.1":{"tag":"1.0.1","author":"herronagency","date":"2025-06-29 12:54:41"}},"upgrade_notice":{"1.0.1":"<ul>\n<li>Plugin metadata updated to include official links to plugin and author website.<\/li>\n<\/ul>","1.0.0":"<ul>\n<li>Initial release.<\/li>\n<\/ul>"},"ratings":[],"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":3319427,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3319427,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":3319427,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"Settings page showing allowed post statuses."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[33535,2487,3468,54012,80],"plugin_category":[43],"plugin_contributors":[244260],"plugin_business_model":[],"class_list":["post-238801","plugin","type-plugin","status-publish","hentry","plugin_tags-content-blocks","plugin_tags-dynamic-content","plugin_tags-post-content","plugin_tags-reusable-content","plugin_tags-shortcode","plugin_category-customization","plugin_contributors-herronagency","plugin_committers-herronagency"],"banners":{"banner":"https:\/\/ps.w.org\/post-content-shortcode\/assets\/banner-772x250.png?rev=3319427","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/post-content-shortcode\/assets\/icon-256x256.png?rev=3319427","icon_2x":"https:\/\/ps.w.org\/post-content-shortcode\/assets\/icon-256x256.png?rev=3319427","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/post-content-shortcode\/assets\/screenshot-1.jpg?rev=3319427","caption":"Settings page showing allowed post statuses."}],"raw_content":"<!--section=description-->\n<p><strong>Post Content Shortcode<\/strong> allows you to display the content of any post using a shortcode like:<\/p>\n\n<p>[post_content id=\"123\"]<\/p>\n\n<p>This is useful for reusing content in multiple places, referencing another post inline, or including dynamically updated blocks of content.<\/p>\n\n<p>You can configure which post statuses are allowed to be embedded from the plugin's settings page under <strong>Settings \u2192 Post Content Shortcode<\/strong>.<\/p>\n\n<h3>Usage<\/h3>\n\n<p>Use the shortcode like this:<\/p>\n\n<p>[post_content id=\"123\"]<\/p>\n\n<p>Where <code>123<\/code> is the ID of the post you want to embed.<\/p>\n\n<p>To avoid infinite loops, the plugin prevents a post from including itself.<\/p>\n\n<p>Only posts with selected <strong>statuses<\/strong> (e.g. Published, Draft) will be rendered. You can control this from the plugin settings page.<\/p>\n\n<h3>Customizing the Shortcode Tag<\/h3>\n\n<p>By default, the shortcode tag is <code>post_content<\/code>. You can change it by adding this to your theme\u2019s <code>functions.php<\/code> file:<\/p>\n\n<p>add_filter( 'herron_pcs_shortcode_tag', function( $tag ) {\n    return 'my_custom_shortcode';\n});<\/p>\n\n<p>After doing so, use the new tag:<\/p>\n\n<p>[my_custom_shortcode id=\"123\"]<\/p>\n\n<p>The settings page and all logic will automatically respect this change.<\/p>\n\n<h3>Learn More About Herron<\/h3>\n\n<p>This plugin is part of Herron\u2019s ongoing effort to give back to the WordPress community. If you\u2019re interested in how we build custom WordPress solutions for clients or want to collaborate, please visit <a href=\"https:\/\/herron.agency\/\">https:\/\/herron.agency\/<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Visit <strong>Settings \u2192 Post Content Shortcode<\/strong> to configure allowed post statuses.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='why%20doesn%27t%20the%20shortcode%20render%20anything%3F'><h3>Why doesn't the shortcode render anything?<\/h3><\/dt>\n<dd><p>Make sure the post you're referencing exists and has an allowed post status (e.g. Published). Check the plugin's Settings page for configuration.<\/p><\/dd>\n<dt id='how%20do%20i%20change%20the%20shortcode%20tag%20name%3F'><h3>How do I change the shortcode tag name?<\/h3><\/dt>\n<dd><p>Use the <code>herron_pcs_shortcode_tag<\/code> filter in your theme's <code>functions.php<\/code>. See the \"Usage\" section for an example.<\/p><\/dd>\n<dt id='does%20the%20plugin%20log%20errors%3F'><h3>Does the plugin log errors?<\/h3><\/dt>\n<dd><p>Yes, but only when <code>WP_DEBUG_LOG<\/code> is enabled in your <code>wp-config.php<\/code> file. This ensures no logs are written unless your site is in debugging mode.<\/p>\n\n<p>To enable logging, add the following lines to <code>wp-config.php<\/code>:<\/p>\n\n<p>define( 'WP_DEBUG', true );\ndefine( 'WP_DEBUG_LOG', true );<\/p>\n\n<p>Logs will be written to <code>wp-content\/debug.log<\/code>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Updated plugin metadata to include plugin and author URIs. No functionality has changed.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Embed the content of another post using a simple shortcode. Useful for reusing content across pages or posts.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/238801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=238801"}],"author":[{"embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/herronagency"}],"wp:attachment":[{"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=238801"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=238801"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=238801"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=238801"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=238801"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=238801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}