Linux 软件免费装
Banner图

Current Post Shortcode

开发者 mdforiduddin
更新时间 2026年1月14日 03:05
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GPLv2 or later
版权网址: 版权信息

标签

shortcode post title custom field post meta current post

下载

1.0.2 1.0.0 1.2.0 1.2.2 2.0.0 3.0.0 3.1.0

详情介绍:

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. Display Current Post Title and Meta Information: Display Data from a Specific Post ID: Display Fallback Meta Value: [current_post meta="custom_field" default="Default Value"] → Displays "Default Value" if the custom field is empty Display Default Value for Zero Meta Value: [current_post meta="custom_field" default="Default Value" skip="true"] → Displays "Default Value" if the custom field value is zero

安装:

From your WordPress dashboard: Or install it manually:

常见问题:

How do I use the shortcodes?

  • Use [current_post] to display the title of the current post.
  • Use [current_post meta="custom_field"] to display a custom field value.
  • To display data from a specific post, use the id attribute.

Can I use this shortcode in widgets or other areas of the site?

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.

How do I handle empty or zero meta values?

You can use the skip attribute to skip empty or zero values and optionally display a default value.

Is there a fallback for meta values?

Yes, you can use the default attribute to provide a fallback value for empty meta values.

更新日志:

3.1.0 - 14/01/2026 3.0.0 - 13/01/2026 1.0.0 - 11/03/2025