Plugin Directory

Test out the new Plugin Directory and let us know what you think.

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.

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.
  • 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)
  • 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 Justin Tadlock's dependable 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"]

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.

How can I find the blog and post IDs?

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.

Can I include pages or posts that already have includes within them?

Yes. RPS Include Content supports "nested" includes. In addition, it prevents infinite loops and duplicate calls to the same content.

What happens if I include a post that does not exist?

If you are logged in and have the manage_rps_include_content capability, you will see an error message appear in place of the shortcode when viewing the public site. Users that are not logged in, or do not have the appropriate capability will not see the error message.

What if the included post is protected by a password?

The included post title will appear followed by the password form, just like the default WordPress behavior.

How do I easily access the source content to edit it?

The best way is to view the page on the public site while logged in. Each piece of source content will be marked with an "i" symbol and a vertical line appearing in theright margin. Hovering over the included content will display "View" and "Edit" buttons. Clicking Edit will take you to the source post/page.

Is it possible to include content into different web sites?

You can include content across different Web sites as long as they are in the same network. A multisite network is a collection of sites that all share the same WordPress installation.

How do I wrap the output from the plugin with my own markup?

You should use the rps_include_content_html filter by adding the following to your theme’s functions file:

function rps_include_content_wrap( $html ) {
    $html = '<div class="rps_include_content_wrap">' . $html . '</div>';
    return $html;
add_filter( 'rps_include_content_html', 'rps_include_content_wrap' );

Adjust the code as necessary to get the desired markup around the included content.

Requires: 3.0 or higher
Compatible up to: 4.7.3
Last Updated: 4 weeks ago
Active Installs: 1,000+


4.7 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1
100,2,2 100,1,1