Title: Post Content Shortcode
Author: Herron
Published: <strong>2025 年 6 月 29 日</strong>
Last modified: 2025 年 6 月 29 日

---

搜尋外掛

![](https://ps.w.org/post-content-shortcode/assets/banner-772x250.png?rev=3319427)

![](https://ps.w.org/post-content-shortcode/assets/icon-256x256.png?rev=3319427)

# Post Content Shortcode

 由 [Herron](https://profiles.wordpress.org/herronagency/) 開發

[下載](https://downloads.wordpress.org/plugin/post-content-shortcode.1.0.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/post-content-shortcode/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/post-content-shortcode/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/post-content-shortcode/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/post-content-shortcode/#developers)

 [技術支援](https://wordpress.org/support/plugin/post-content-shortcode/)

## 外掛說明

**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.

### Learn More About Herron

This plugin is part of Herron’s ongoing effort to give back to the WordPress community.
If you’re interested in how we build custom WordPress solutions for clients or want
to collaborate, please visit [https://herron.agency/](https://herron.agency/).

## 螢幕擷圖

 * [[
 * Settings page showing allowed post statuses.

## 安裝方式

 1. Upload the plugin folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Visit **Settings  Post Content Shortcode** to configure allowed post statuses.

## 常見問題集

### Why doesn’t the shortcode render anything?

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.

### How do I change the shortcode tag name?

Use the `herron_pcs_shortcode_tag` filter in your theme’s `functions.php`. See the“
Usage” section for an example.

### Does the plugin log errors?

Yes, but only when `WP_DEBUG_LOG` is enabled in your `wp-config.php` file. This 
ensures no logs are written unless your site is in debugging mode.

To enable logging, add the following lines to `wp-config.php`:

define( ‘WP_DEBUG’, true );
 define( ‘WP_DEBUG_LOG’, true );

Logs will be written to `wp-content/debug.log`.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Post Content Shortcode〉的開發相關工作。

參與者

 *   [ Herron ](https://profiles.wordpress.org/herronagency/)

[將〈Post Content Shortcode〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/post-content-shortcode)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/post-content-shortcode/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/post-content-shortcode/)，或
透過 [RSS](https://plugins.trac.wordpress.org/log/post-content-shortcode/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/post-content-shortcode/)。

## 變更記錄

#### 1.0.1

 * Updated plugin metadata to include plugin and author URIs. No functionality has
   changed.

#### 1.0.0

 * Initial release.

## 中繼資料

 *  版本 **1.0.1**
 *  最後更新 **11 個月前**
 *  啟用安裝數 **40+**
 *  WordPress 版本需求 ** 5.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.8.5**
 *  PHP 版本需求 ** 7.0 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/post-content-shortcode/)
 * 標籤:
 * [Content Blocks](https://tw.wordpress.org/plugins/tags/content-blocks/)[dynamic content](https://tw.wordpress.org/plugins/tags/dynamic-content/)
   [post content](https://tw.wordpress.org/plugins/tags/post-content/)[reusable content](https://tw.wordpress.org/plugins/tags/reusable-content/)
   [shortcode](https://tw.wordpress.org/plugins/tags/shortcode/)
 *  [進階檢視](https://tw.wordpress.org/plugins/post-content-shortcode/advanced/)

## 評分

這個項目尚無任何評論記錄。

[Your review](https://wordpress.org/support/plugin/post-content-shortcode/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/post-content-shortcode/reviews/)

## 參與者

 *   [ Herron ](https://profiles.wordpress.org/herronagency/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/post-content-shortcode/)