sandywp / plugins / rps-include-content
RPS Include Content
Makes it easy to pull content from one post or page and place it on another using a simple shortcode, even in a multisite environment.
Ready in seconds.
v1.2.3 700+ installs WP 5.0+

About this plugin
The RPS Include Content plugin is useful when you need to include the same content across many posts or pages. For example, you may want to place your company boilerplate at the bottom of press releases in your News section. Instead of pasting the boilerplate copy at the end of each of these pages, you can now insert the shortcode (along with the post ID, and for multisite configurations, the blog ID) where that content should appear.
When you modify your source copy, changes will appear on all pages that contain the shortcode. There’s no need to open and modify multiple pages.
When a user previews the post from the WordPress Administration, the included content is distinguished with an on-hover highlight. A link is provided so that the source content can be conveniently accessed and modified. The preview of the include will not distort the target page – the width, height and position will remain as defined by the site.
To easily obtain the blog ID and post ID, install the free RPS Blog Info plugin, which places that information (and much more) on your WordPress 3.3 Toolbar.
Features
- Include featured image of the included post with optional wrapper and custom class.
- Allows specific shortcodes to display within included posts.
- Allows oEmbeds to display within included posts.
- Respects the more tag in posts automatically.
- Set the length of the content to be displayed by word count.
- Option to remove the hover interface.
- Option to include private content.
- Display the title of the included post without any content.
- Include the title of the included post with or without a hyperlink.
- Include a page or a post in another page or post.
- Specify whether the content or the excerpt should be used.
- Updates made to source content are reflected on all target pages.
- Source content pulled into a page is easily distinguishable and accessible when viewing the page on the front-end while logged into the WordPress back-end.
- Protects against generating include loops and calling nonexistent source content.
- Displays errors on the front-end to logged-in page/post editors.
- Compatible with single and multisite installs.
- Support for password protected posts.
- Strip shortcodes from included posts.
- Default Settings page.
Questions
- How does the RPS Include Content shortcode work?
The basic syntax of the shortcode is:
[rps-include blog="#" post="#"]You do not need to specify the blog ID if you are not in a multisite environment.
- What other shortcode attributes can be used?
- title – Use a boolean (true/false) to specify whether to display the title of the source content on the target post/pages. The default is false.
- titletag – Use h1 through h6 to define the tag to wrap around the title. The default is h2.
- titlelink – Specify whether the titletag should be a link to the included post. The default is false.
- content – Specify whether to use the included post’s content, excerpt, lede, full or none. The default is content. Note that if you set the content to none then the title attribute is automatically set to true, since something of the included content should be shown. Using the full option ignores the more tag of the included content.
- length – Define the length in words of the text that appears before the more link. The default is 55. This setting has no effect if a more tag is present in the included content or if the content attribute is not set to lede.
- filter – Force the included content to be formatted. The default is false.
- shortcodes – Specify whether shortcodes should be allowed to remain in included posts. The default is true.
- allow_shortcodes – Specify which shortcodes should be allowed to remain in included posts. Overrides the shortcodes attribute. (ie. gallery and caption)
- embeds – Specify whether embeds should be displayed in included posts. The default is false.
- more_text – Specify the string to be presented as the “more text”. The default is Read more ….
- length – Specify that only a specific number of words should be used before the more link is displayed. Requires that the content attribute be set to lede. The default is 55.
- hover – Define whether to show the hover interface on the included content. The default is true. You can set the default behavior on the Settings page.
- private – Determines if included content with a status of private should be displayed regardless of current user capabilities. The default is false. You can set the default behavior on the Settings page.
- featured_image – Determines if the featured image associated with the included content is displayed. The default is false.
- featured_image_size – Specifies the size of the image to retrieve by name. The default is post-thumbnail.
- featured_image_wrap – Determines if the featured image is wrapped with a div. The default is false.
- featured_image_wrap_class – Specifies the class associated with the featured image wrap. The default is post-thumbnail.
- How do I add the capability “manage_rps_include_content” to roles other than the Administrator role?
You can use the Members plugin to enable the capability for other roles.
- What if my included content loses its formatting?
It seems that there are cases where the default content filters are not applied before the content is displayed. If this is the case then you simply need to add the shortcode attribute “filter” and set it to “true”.
- What if I have shortcodes in my included content that I don’t want to display?
Add the “shortcode” attribute and set it to “false”. Keep in mind that using this method will remove all shortcodes from the included content, including any rps-include shortcodes that are designed to call included content that is nested inside other included content. However, this should not affect most users.
[rps-include post="500" shortcodes="false"]You may consider using the “allow_shortcodes” attribute instead to specify which shortcodes should be displayed when the content is included elsewhere. This overrides the “shortcode” attribute setting so there is no need to provide it. Be sure to pass the shortcodes as a comma delimited string as in the example below.
[rps-include post="500" allow_shortcodes="gallery,caption"]- How do I make a url in the included display as an embed?
As long as the URL is on the WordPress embed whitelist you can make it display within the included content by adding the embeds attribute and setting it to true.
[rps-include post="500" embeds="true"]- So what if I want to show the title of the source content (blog 2, post 500) wrapped in an h3 with the title being a link?
[rps-include blog=”2″ post=”500″ title=”true” titletag=”h3″ titlelink=”true”]
- What if I only want to show the title of the source content?
[rps-include post=”500″ content=”none”]
Setting the content attribute to ‘none’ forces the title to show.
sandywp / also on the shelf
Try another plugin
5.0 · 40+ installs
This plugin allows you to include content from a custom post type by using a shortcode. You can also add custom CSS and JS to the…
WP Anti Copy – Protect your precious content from copying
5.0 · 10+ installs
Get a notification every time someone tries to copy your content. This will help you know instantly when some content is copied…
4.0 · 10+ installs
copy-me allows you to copy a post, page or custom post type to another site in a Wordpress multisite.
Spin up a real WordPress site in seconds.
Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.