If you want to embed the content of a page/post from the same site inside of another page/post, you can use the [reuse_post] shortcode. It pulls in just the content (no sidebar, header, etc.) of the target post, so it looks as if the it were part of the original page. This allows you to insert the same material in several places, but only have to edit it in one.
This feature is only available in the Meerkat theme.
Creating the shortcode
The [reuse_post] shortcode can be set up 2 ways:
- using the shortcode builder interface in visual mode (recommended)
- manually typing in the shortcode and attributes into the editor
Select a tab below for the corresponding instructions.
To create the [reuse_post] shortcode:
- Place your cursor in the visual editor where you'd like the reused post content to appear.
- Click on the "Shortcodes" button, located in the 2nd row of your visual editor's toolbar (outlined in orange below). If you only see 1 row of tools, click on the kitchen sink (outlined in green below) to reveal the 2nd row.
- Hover over the "Embed External Content" menu to reveal its submenu, and select "Reuse Post", outlined in red below.
In the popup dialog form, click on the "Select a post/page" pulldown menu (outlined in red below) to see a list of all the pages and posts on your site, in alphabetical order. Choose a page/post to embed, and click "OK" button to insert the shortcode into the editor.
Editing the shortcode
In the editor (in both visual and text modes), the shortcode will look something like this:
You can edit the shortcode attributes (the values inside the quotes above) directly, or you can delete the shortcode, and create a new one using the shortcode builder tool again.
The shortcode looks like this:
Copy the line above and paste it into your editor. Replace 123 with the ID of the page/post you want to embed. To get a post's ID, look at the URL in the location bar of your browser while editing it. It will be the number following ?post= (shown outlined in red below).