{"id":224151,"date":"2025-03-12T00:19:34","date_gmt":"2025-03-12T00:19:34","guid":{"rendered":"https:\/\/en-gb.wordpress.org\/plugins\/current-post-shortcode\/"},"modified":"2026-01-13T19:05:40","modified_gmt":"2026-01-13T19:05:40","slug":"current-post-shortcode","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/current-post-shortcode\/","author":20585636,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"3.1.0","stable_tag":"3.1.0","tested":"6.9.4","requires":"6.7","requires_php":"7.4","requires_plugins":null,"header_name":"Current Post Shortcode","header_author":"Md Forid Uddin","header_description":"The Current Post Shortcode plugin allows you to display the current post's title and metadata using simple shortcodes.","assets_banners_color":"169172","last_updated":"2026-01-13 19:05:40","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/mdforiduddin\/","header_author_uri":"https:\/\/foriduddin.netlify.app\/","rating":0,"author_block_rating":0,"active_installs":30,"downloads":604,"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":"mdforiduddin","date":"2025-03-12 00:47:05"},"1.0.2":{"tag":"1.0.2","author":"mdforiduddin","date":"2026-01-11 08:18:49"},"1.2.0":{"tag":"1.2.0","author":"mdforiduddin","date":"2026-01-11 09:56:11"},"1.2.2":{"tag":"1.2.2","author":"mdforiduddin","date":"2026-01-13 09:43:17"},"2.0.0":{"tag":"2.0.0","author":"mdforiduddin","date":"2026-01-13 10:06:40"},"3.0.0":{"tag":"3.0.0","author":"mdforiduddin","date":"2026-01-13 18:32:01"},"3.1.0":{"tag":"3.1.0","author":"mdforiduddin","date":"2026-01-13 19:05:40"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":3436544,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":3436544,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":3436544,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3436544,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.2","1.2.0","1.2.2","2.0.0","3.0.0","3.1.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[253931,2009,4586,1457,80],"plugin_category":[43],"plugin_contributors":[239410],"plugin_business_model":[],"class_list":["post-224151","plugin","type-plugin","status-publish","hentry","plugin_tags-current-post","plugin_tags-custom-field","plugin_tags-post-meta","plugin_tags-post-title","plugin_tags-shortcode","plugin_category-customization","plugin_contributors-mdforiduddin","plugin_committers-mdforiduddin"],"banners":{"banner":"https:\/\/ps.w.org\/current-post-shortcode\/assets\/banner-772x250.jpg?rev=3436544","banner_2x":"https:\/\/ps.w.org\/current-post-shortcode\/assets\/banner-1544x500.jpg?rev=3436544","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/current-post-shortcode\/assets\/icon-128x128.jpg?rev=3436544","icon_2x":"https:\/\/ps.w.org\/current-post-shortcode\/assets\/icon-256x256.jpg?rev=3436544","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>The \"Current Post Shortcode\" plugin allows you to display post titles and custom field values using simple shortcodes. You can display the current post's title or meta information, or specify a post ID to retrieve data from a specific post.<\/p>\n\n<h4>Display Current Post Title and Meta Information:<\/h4>\n\n<ul>\n<li><strong>Post Title:<\/strong> <code>[current_post]<\/code>  \u2192 Outputs the current post title, e.g., \"Hello World\"<\/li>\n<li><strong>Post Meta<\/strong> (Custom Field): <code>[current_post meta=\"custom_field\"]<\/code>  \u2192 Outputs the value of the custom field<\/li>\n<\/ul>\n\n<h4>Display Data from a Specific Post ID:<\/h4>\n\n<ul>\n<li><strong>Post Title:<\/strong> <code>[current_post id=\"123\"]<\/code>  \u2192 Outputs the title of the post with ID \"123\"<\/li>\n<li><strong>Post Meta<\/strong> (Custom Field): <code>[current_post id=\"123\" meta=\"custom_field\"]<\/code>  \u2192 Outputs the value of the custom field in the post with ID \"123\"<\/li>\n<\/ul>\n\n<h4>Display Fallback Meta Value:<\/h4>\n\n<pre><code>[current_post meta=\"custom_field\" default=\"Default Value\"]  \u2192 Displays \"Default Value\" if the custom field is empty\n<\/code><\/pre>\n\n<h4>Display Default Value for Zero Meta Value:<\/h4>\n\n<pre><code>[current_post meta=\"custom_field\" default=\"Default Value\" skip=\"true\"]  \u2192 Displays \"Default Value\" if the custom field value is zero\n<\/code><\/pre>\n\n<!--section=installation-->\n<h4>From your WordPress dashboard:<\/h4>\n\n<ul>\n<li>Go to Plugins &gt; Add New.<\/li>\n<li>Search for 'Current Post Shortcode'.<\/li>\n<li>Click \"Install Now\", then \"Activate Plugin\".<\/li>\n<\/ul>\n\n<h4>Or **install it manually**:<\/h4>\n\n<ul>\n<li>Download the plugin ZIP file from <a href=\"https:\/\/wordpress.org\/plugins\/current-post-shortcode\/\">WordPress Directory<\/a>.<\/li>\n<li>Log in to your WordPress Dashboard, navigate to Plugins &gt; Add New, and click the \"Upload Plugin\" button.<\/li>\n<li>Choose the plugin ZIP file and click \"Install Now\".<\/li>\n<li>After installation, click \"Activate Plugin\".<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20do%20i%20use%20the%20shortcodes%3F'><h3>How do I use the shortcodes?<\/h3><\/dt>\n<dd><ul>\n<li>Use <code>[current_post]<\/code> to display the title of the current post.<\/li>\n<li>Use <code>[current_post meta=\"custom_field\"]<\/code> to display a custom field value.<\/li>\n<li>To display data from a specific post, use the <code>id<\/code> attribute.<\/li>\n<\/ul><\/dd>\n<dt id='can%20i%20use%20this%20shortcode%20in%20widgets%20or%20other%20areas%20of%20the%20site%3F'><h3>Can I use this shortcode in widgets or other areas of the site?<\/h3><\/dt>\n<dd><p>Yes, you can use these shortcodes anywhere shortcodes are supported in WordPress, such as posts, pages, widgets, Gutenberg blocks, and page builders like Elementor, Divi, WPBakery, etc.<\/p><\/dd>\n<dt id='how%20do%20i%20handle%20empty%20or%20zero%20meta%20values%3F'><h3>How do I handle empty or zero meta values?<\/h3><\/dt>\n<dd><p>You can use the <code>skip<\/code> attribute to skip empty or zero values and optionally display a default value.<\/p><\/dd>\n<dt id='is%20there%20a%20fallback%20for%20meta%20values%3F'><h3>Is there a fallback for meta values?<\/h3><\/dt>\n<dd><p>Yes, you can use the <code>default<\/code> attribute to provide a fallback value for empty meta values.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>3.1.0 - 14\/01\/2026<\/h4>\n\n<ul>\n<li>Added Shortcode functionality for displaying current post information.<\/li>\n<li>Added support for displaying meta values with fallback options.<\/li>\n<\/ul>\n\n<h4>3.0.0 - 13\/01\/2026<\/h4>\n\n<ul>\n<li>Improved shortcode functionality to support additional attributes.<\/li>\n<li>Enhanced compatibility with the latest WordPress versions.<\/li>\n<li>Added fallback meta value for better user experience.<\/li>\n<\/ul>\n\n<h4>1.0.0 - 11\/03\/2025<\/h4>\n\n<ul>\n<li>Initial release of the plugin.<\/li>\n<\/ul>","raw_excerpt":"The Current Post Shortcode plugin allows you to display the current post&#039;s title and metadata using simple shortcodes.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/224151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=224151"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mdforiduddin"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=224151"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=224151"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=224151"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=224151"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=224151"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=224151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}