[post_description]

The shortcode is designed to display the description of a post dynamically.


Product


Shortcode Attributes

  1. id – Post ID whose content you want to display. Not required if used for the current post.
    • Options: Any valid post ID.
  2. label – A label to display before the post description.
    • Options: Any text value.

Shortcode Enclosed Content

Any content placed between [post_description] and [/post_description] will be used as a template, where {content} acts as a placeholder for the post description.


Example Usage

Example 1

[post_description]

Results

Display the content of the current post.

Example 2

[post_description id="456"]

Results

Display the content of Post with ID 456.

Example 3

[post_description label="About this location:"]

Results

Add a label About this location: before the post content.

Example 4

[post_description]<div class="custom-class">{content}</div>[/post_description]

Results

<div class="custom-class">The content of the Current Post</div>
Wrap the post content in custom HTML.
If the get_post_more_content() function is used in your theme or plugin, the shortcode will automatically handle “Read more” functionality.