by cgrymala
4.8 (31 reviews)
Post Content Shortcodes
Adds shortcodes to display the content of a post or a list of posts.
Tested up to WP 4.9 (Current: 6.9)
v1.0.1.1
Current Version v1.0.1.1
Updated 7 years ago
Last Update on 03 Apr, 2018
Synced 7 hours ago
Last Synced on
Rank
#4,359
-4 this week
Active Installs
3K+
-4.5%
KW Avg Position
25
—
No change
Downloads
99.5K
+2 today
Support Resolved
0%
—
No change
Rating
96%
Review 4.8 out of 5
4.8
(31 reviews)
Next Milestone 4K
3K+
4K+
521
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro
Unlock Exact Install Count
See the precise estimated active installs for this plugin, calculated from real-time ranking data.
- Exact install estimates within tiers
- Track install growth over time
- Milestone progress predictions
Need 894 more installs to reach 4K+
Rank Changes
Current
#4,359
Change
Best
#
Downloads Growth
Downloads
Growth
Peak
Upgrade to Pro
Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.
Upgrade NowReviews & Ratings
4.8
31 reviews
Overall
96%
5
29
(94%)
4
0
(0%)
3
1
(3%)
2
0
(0%)
1
1
(3%)
Tracked Keywords
Showing 1 of 1| Keyword | Position | Change | Type | Updated |
|---|---|---|---|---|
| syndication | 25 | — | Tag | 8 hours ago |
Unlock Keyword Analytics
Track keyword rankings, search positions, and discover new ranking opportunities with a Pro subscription.
- Full keyword position tracking
- Historical ranking data
- Competitor keyword analysis
Track This Plugin
Get detailed analytics, keyword tracking, and position alerts delivered to your inbox.
Start Tracking FreePlugin Details
- Version
- 1.0.1.1
- Last Updated
- Apr 03, 2018
- Requires WP
- 4.3+
- Tested Up To
- 4.9
- PHP Version
- N/A
- Author
- cgrymala
Support & Rating
- Rating
- ★ ★ ★ ★ ★ 4.8
- Reviews
- 31
- Support Threads
- 0
- Resolved
- 0%
Keywords
Upgrade to Pro
Unlock keyword rankings, search positions, and detailed analytics with a Pro subscription.
Upgrade NowSimilar Plugins
WP Adminify – White Label WordPress, Admin Menu Editor, Login Customizer
7K+ installs
#2,738
Master Addons For Elementor – White Label, Free Widgets, Hover Effects, Conditions, & Animations
40K+ installs
#930
Qi Addons For Elementor
200K+ installs
#253
MW
MW WP Form
200K+ installs
#262
WPFront Scroll Top
200K+ installs
#270
Frequently Asked Questions
Common questions about Post Content Shortcodes
The easiest way to install this plugin automatically from within your administration area.
Go to Plugins -> Add New in your administration area, then search for the plugin "Post Content Shortcodes".
Click the "Install" button.
Go to the Plugins dashboard and "Activate" the plugin (for MultiSite users, you can safely "Network Activate" this plugin).
Manual Installation
If that doesn't work, or if you prefer to install it manually, you have two options.
Upload the ZIP
Download the ZIP file from the WordPress plugin repository.
Go to Plugins -> Add New -> Upload in your administration area.
Click the "Browse" (or "Choose File") button and find the ZIP file you downloaded.
Click the "Upload" button.
Go to the Plugins dashboard and "Activate" the plugin (for MultiSite users, you can safely "Network Activate" this plugin).
FTP Installation
Download the ZIP file from the WordPress plugin repository.
Unzip the file somewhere on your harddrive.
FTP into your Web server and navigate to the /wp-content/plugins directory.
Upload the post-content-shortcodes folder and all of its contents into your plugins directory.
Go to the Plugins dashboard and "Activate" the plugin (for MultiSite users, you can safely "Network Activate" this plugin).
Must-Use Installation
If you would like to force this plugin to be active (generally only useful for Multi Site installations) without an option to deactivate it, you can upload the post-content-shortcodes.php & class-post-content-shortcodes.php files to your /wp-content/mu-plugins folder. If the mu-plugins folder does not exist, you can safely create it. Make sure not to upload the post-content-shortcodes folder into your mu-plugins directory, as "Must Use" plugins must reside in the root mu-plugins directory in order to work.
How do I use this plugin?
To display the content of a single post within another post, you want to use the [post-content] shortcode. To display the content of the post with an ID of 25 and a slug of 'this-is-my-cool-post', the usage would look like:
[post-content id=25]
or
[post-content post_name="this-is-my-cool-post"]
To display a list of posts within another post, you want to use the [post-list] shortcode. To display a list of all pages (post_type=page) on this site, the usage would look like:
[post-list post_type="page"]
By default, this plugin will display all posts that match the specified criteria (except for the current post). To limit the number of posts that are displayed, you should add the numberposts argument to the shortcode. That would look like:
[post-list post_type="page" numberposts=15]
Does the shortcode output any extra HTML?
The [post-content] shortcode will not output any extra HTML at all. It simply outputs the content of the page being cloned. The original title is not output, nor is any sort of wrapper HTML.
The [post-list] shortcode, however, does output some HTML to actually format the list. The default HTML code output looks like:
<ul class="post-list">
<li class="listed-post"><a href="%permalink%" title="%title%">%title</a></li>
</ul>
How do I change the HTML output for the post-list?
There are some filters available within the plugin that can alter the HTML generated by the shortcode. Those filters are as follows:
post-content-shortcodes-open-list - filters the opening '<ul>' tag
post-content-shortcodes-open-item - filters the opening '<li>' tag
post-content-shortcodes-item-link-open - filters the opening '<a>' tag. Three parameters are available with this filter. The constructed '<a>' tag is sent as the first parameter, the permalink is the second and the title attribute is the third. The 'the_permalink' filter is applied to the permalink before it is sent or used, and the 'the_title_attribute' filter is applied to the title attribute before it is sent or used.
post-content-shortcodes-item-link-close - filters the closing '</a>' tag
post-content-shortcodes-close-item - filters the closing '</li>' tag
post-content-shortcodes-close-list - filters the closing '</ul>' tag
Go to Plugins -> Add New in your administration area, then search for the plugin "Post Content Shortcodes".
Click the "Install" button.
Go to the Plugins dashboard and "Activate" the plugin (for MultiSite users, you can safely "Network Activate" this plugin).
Manual Installation
If that doesn't work, or if you prefer to install it manually, you have two options.
Upload the ZIP
Download the ZIP file from the WordPress plugin repository.
Go to Plugins -> Add New -> Upload in your administration area.
Click the "Browse" (or "Choose File") button and find the ZIP file you downloaded.
Click the "Upload" button.
Go to the Plugins dashboard and "Activate" the plugin (for MultiSite users, you can safely "Network Activate" this plugin).
FTP Installation
Download the ZIP file from the WordPress plugin repository.
Unzip the file somewhere on your harddrive.
FTP into your Web server and navigate to the /wp-content/plugins directory.
Upload the post-content-shortcodes folder and all of its contents into your plugins directory.
Go to the Plugins dashboard and "Activate" the plugin (for MultiSite users, you can safely "Network Activate" this plugin).
Must-Use Installation
If you would like to force this plugin to be active (generally only useful for Multi Site installations) without an option to deactivate it, you can upload the post-content-shortcodes.php & class-post-content-shortcodes.php files to your /wp-content/mu-plugins folder. If the mu-plugins folder does not exist, you can safely create it. Make sure not to upload the post-content-shortcodes folder into your mu-plugins directory, as "Must Use" plugins must reside in the root mu-plugins directory in order to work.
How do I use this plugin?
To display the content of a single post within another post, you want to use the [post-content] shortcode. To display the content of the post with an ID of 25 and a slug of 'this-is-my-cool-post', the usage would look like:
[post-content id=25]
or
[post-content post_name="this-is-my-cool-post"]
To display a list of posts within another post, you want to use the [post-list] shortcode. To display a list of all pages (post_type=page) on this site, the usage would look like:
[post-list post_type="page"]
By default, this plugin will display all posts that match the specified criteria (except for the current post). To limit the number of posts that are displayed, you should add the numberposts argument to the shortcode. That would look like:
[post-list post_type="page" numberposts=15]
Does the shortcode output any extra HTML?
The [post-content] shortcode will not output any extra HTML at all. It simply outputs the content of the page being cloned. The original title is not output, nor is any sort of wrapper HTML.
The [post-list] shortcode, however, does output some HTML to actually format the list. The default HTML code output looks like:
<ul class="post-list">
<li class="listed-post"><a href="%permalink%" title="%title%">%title</a></li>
</ul>
How do I change the HTML output for the post-list?
There are some filters available within the plugin that can alter the HTML generated by the shortcode. Those filters are as follows:
post-content-shortcodes-open-list - filters the opening '<ul>' tag
post-content-shortcodes-open-item - filters the opening '<li>' tag
post-content-shortcodes-item-link-open - filters the opening '<a>' tag. Three parameters are available with this filter. The constructed '<a>' tag is sent as the first parameter, the permalink is the second and the title attribute is the third. The 'the_permalink' filter is applied to the permalink before it is sent or used, and the 'the_title_attribute' filter is applied to the title attribute before it is sent or used.
post-content-shortcodes-item-link-close - filters the closing '</a>' tag
post-content-shortcodes-close-item - filters the closing '</li>' tag
post-content-shortcodes-close-list - filters the closing '</ul>' tag
If the [post-list] shortcode retrieves an empty list of posts/pages, it will normally return an empty string (so as not to disrupt the flow of the page). However, you can have the shortcode output a custom error message by hooking into the post-content-shortcodes-no-posts-error filter.
If you would like to use a different set of default values for the shortcode arguments, you can hook into the post-content-shortcodes-defaults filter. The array of default arguments is passed to that filter before it gets used.
If you would like to alter the output of the [post-content] shortcode (for instance, to wrap it in an HTML container, or to add content before or after), you can hook into the post-content-shortcodes-content filter. The constructed HTML output is passed as the first parameter, and the WordPress post object is passed as a second parameter.
If you would like to change the "Read More" link used in the [post-content] shortcode (if you are limiting the length of the content/excerpt), you can use the post-content-shortcodes-read-more filter to do so.
If you would like to modify the class used on the featured image (if appropriate), you can use the post-content-shortcodes-image-class to do that.
By default, the plugin uses 'thumbnail' as the size of the featured image. If you would like to use a different registered size, you can change that with the post-content-shortcodes-default-image-size filter.
There are also four actions that are executed (as of 0.6) within the plugin:
pcs_starting_post_content - Fires when the post_content() function is entered; allows you to selectively add any special filters, etc. that need to be added just for use within the post-content shortcode.
pcs_ending_post_content - Fires before the output from the post_content() function is returned; allows you to remove any filters that you may have added in the pcs_starting_post_content action.
pcs_starting_post_list - Fires when the post_list() function is entered; allows you to selectively add any special filters, etc. that need to be added just for use within the post-list shortcode.
pcs_ending_post_list - Fires before the output from the post_list() function is returned; allows you to remove any filters you may have added in the pcs_starting_post_list action.
Why isn't the current post included in the list of posts?
By default, the [post-list] shortcode excludes the current post (since that would cause somewhat of a loop in the user's mind; clicking on a link in the page only to have the page reload with the same content). To allow the current post to be displayed in the list of posts, set the exclude_current argument to 0. That might look something like:
[post-list exclude_current=0]
How do I pull posts from another blog in the network?
Use the blog attribute to specify which site/blog the post should be pulled from. The blog attribute can accept a blog ID (numeric) or a blog name (the slug of the blog).
Will this plugin work in a multisite environment?
Yes. You can safely network-activate this plugin, or even use it as a mu-plugin. To pull a post with a slug of 'this-is-my-cool-post' from a blog with an ID of 10 and a slug of 'mycoolsite', the usage would look something like:
[post-content post_name="this-is-my-cool-post" blog=10]
or
[post-content post_name="this-is-my-cool-post" blog="mycoolsite"]
Will this plugin work with multinetwork?
Yes. The way this plugin works, there is no distinction between multi-network & multisite. You can use the blog_id argument to pull posts from any site in the entire multi-network installation; regardless of which network they fall under.
Why is my page getting all messed up when I use this?
There is a known issue where HTML (especially [caption] shortcodes) within the excerpt can break the entire page. In order to avoid this, be sure to place the tag above the [caption] shortcode within the posts being pulled into the post-list shortcode.
Why are the thumbnails/links wrong when using a Content Template from the Views plugin?
Unfortunately, because of the way the Views plugin processes posts, the [wpv-post-url], [wpv-post-link] and [wpv-post-featured-image] shortcodes do not work properly. Instead, you will need to use the [pcs-post-url] and [pcs-thumbnail] shortcodes.
If you would like to use a different set of default values for the shortcode arguments, you can hook into the post-content-shortcodes-defaults filter. The array of default arguments is passed to that filter before it gets used.
If you would like to alter the output of the [post-content] shortcode (for instance, to wrap it in an HTML container, or to add content before or after), you can hook into the post-content-shortcodes-content filter. The constructed HTML output is passed as the first parameter, and the WordPress post object is passed as a second parameter.
If you would like to change the "Read More" link used in the [post-content] shortcode (if you are limiting the length of the content/excerpt), you can use the post-content-shortcodes-read-more filter to do so.
If you would like to modify the class used on the featured image (if appropriate), you can use the post-content-shortcodes-image-class to do that.
By default, the plugin uses 'thumbnail' as the size of the featured image. If you would like to use a different registered size, you can change that with the post-content-shortcodes-default-image-size filter.
There are also four actions that are executed (as of 0.6) within the plugin:
pcs_starting_post_content - Fires when the post_content() function is entered; allows you to selectively add any special filters, etc. that need to be added just for use within the post-content shortcode.
pcs_ending_post_content - Fires before the output from the post_content() function is returned; allows you to remove any filters that you may have added in the pcs_starting_post_content action.
pcs_starting_post_list - Fires when the post_list() function is entered; allows you to selectively add any special filters, etc. that need to be added just for use within the post-list shortcode.
pcs_ending_post_list - Fires before the output from the post_list() function is returned; allows you to remove any filters you may have added in the pcs_starting_post_list action.
Why isn't the current post included in the list of posts?
By default, the [post-list] shortcode excludes the current post (since that would cause somewhat of a loop in the user's mind; clicking on a link in the page only to have the page reload with the same content). To allow the current post to be displayed in the list of posts, set the exclude_current argument to 0. That might look something like:
[post-list exclude_current=0]
How do I pull posts from another blog in the network?
Use the blog attribute to specify which site/blog the post should be pulled from. The blog attribute can accept a blog ID (numeric) or a blog name (the slug of the blog).
Will this plugin work in a multisite environment?
Yes. You can safely network-activate this plugin, or even use it as a mu-plugin. To pull a post with a slug of 'this-is-my-cool-post' from a blog with an ID of 10 and a slug of 'mycoolsite', the usage would look something like:
[post-content post_name="this-is-my-cool-post" blog=10]
or
[post-content post_name="this-is-my-cool-post" blog="mycoolsite"]
Will this plugin work with multinetwork?
Yes. The way this plugin works, there is no distinction between multi-network & multisite. You can use the blog_id argument to pull posts from any site in the entire multi-network installation; regardless of which network they fall under.
Why is my page getting all messed up when I use this?
There is a known issue where HTML (especially [caption] shortcodes) within the excerpt can break the entire page. In order to avoid this, be sure to place the tag above the [caption] shortcode within the posts being pulled into the post-list shortcode.
Why are the thumbnails/links wrong when using a Content Template from the Views plugin?
Unfortunately, because of the way the Views plugin processes posts, the [wpv-post-url], [wpv-post-link] and [wpv-post-featured-image] shortcodes do not work properly. Instead, you will need to use the [pcs-post-url] and [pcs-thumbnail] shortcodes.