Recently one of our users asked if it was possible to add content from a WordPress page into another post or page. In this article, we will show you how to insert content from one WordPress page to another post, page, or any custom post types.
First thing you need to do is install and activate the Insert Pages plugin. Upon activation simply go to Posts » Add New to see it in action.
If you use visual editor, then you will notice a new button labeled ‘Insert Page’ in the menu.
Clicking on it will bring up a popup where you can select the page, post, or custom post type you want to add.
You can choose how you would like to insert the post/page by clicking on the Options. By default you can add title, content, link, or choose a custom template. We will explain custom templates later in this article.
After choosing the post/page click on the Insert Page button. The plugin will add the shortcode required to display your selected post/page.
If you use the text editor to write your posts, then you can manually enter the shortcode. The shortcode parameters are quite simple.
[insert page='page-slug|ID' display='title|link|content|all|custom-template.php']
The page parameter for the shortcode accepts page-slug or ID. Please note that by page slug, it doesn’t mean that you can only enter pages. You can add any post or custom post type’s slug as well.
You can also use post id. Here is a quick guide on how to find post id in WordPress.
[insert page='author-syed-balkhi' display='content']
[insert page='128' display='content']
[insert page='128' display='all']
[insert page='128' display='custom-author.php']
Adding Custom Post Types into Posts
Using WordPress you can add any type of content by creating post types for different content types. Checkout our guides on when do you need a custom post type and how to create a custom post type in WordPress.
Insert Pages allows you to add your custom post types into posts and pages. For example, you can create a custom post type for image galleries and then use Insert Pages to add those galleries into your posts or pages.
Similarly, you can create custom post types for videos, portfolio, client testimonials, etc. to add into your pages or posts.
Using Custom Templates to Display Inserted Pages
Insert Pages allows you to display title, link, content, or all fields for inserted pages. However some users may still need to tweak the display to meet their own needs. This can be achieved by using custom templates.
All you need to do is create a blank php file and upload it to your theme directory. You can name the file anything you want. For example, custom-author.php.
This custom template works exactly like any other content template files in your theme. Here is sample template file that we created to display author pages.
<?php the_post(); ?> <h3 class="author-name"><?php the_title(); ?></h3> <?php if ( has_post_thumbnail() ) : ?> <div class="author-thumbnail"> <?php the_post_thumbnail(); ?> </div> <?php endif; ?> <div class="author-bio"> <?php the_content() ?> </div>
You can use custom CSS classes in your template file and then style them in your theme’s stylesheet. We used this to style the display of author pages.
h3.author-name { font-size:16px; } .author-thumbnail { float:left; padding:10px; } .author-bio { font-style:italic; font-family: Lora, Georgia, Serif; }
This is how the end result looked on our dummy site:
We hope this article helped you add content from one WordPress page/post to another.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.
I would like to use this to add contact info and a photo, like the author box, at the bottom of every page so I can update one page and automatically update all other pages. Will this plugin slow down my site?
The plugin shouldn’t slow down your site.
Hi, I added the plugin & the code. It worked. but for example, when I have content in page2 and wanna copy the page1’s content in it, it doesn’t work.
What should I do?
I have a question:
If I create a Page and display Post now I will have 2 identical contents: 1 for the page and the other in the post…Won´t that be duplicate content…?
My WordPress add page in not visible for CPT editor…..
Hello. How to insert product categories woocommerce ? Sorry my English
I am trying to use the insert page plugin but get two random issues.
1. It doesn’t update the author. I created the post but switched it to someone else but when the plugin is enabled it continues to show me as the author and when I deactivate the plugin the author shows who I selected it to be.
2. the plugin seems to disable the commenting system. When the plugin is enabled the comments do not show and when it is disabled they come back.
using duplicate content will harm my SEO raking ..
please is it possible to add another website blog page to your own website?
Thanks for this great work.
<Request: I use the default post type of WP to create my content, before I know about custom post type. Now, I would like to move Movie to the movie custom post section from the default, how can I do this or can I get a link to the tutorial you have that covers this.
Hope to hear from you, thanks.
I have to add six separate posts to a collaborative WordPress.com blog for a school assignment. I already created the post in my own WordPress.com account, but I do not know how to transfer that post to the other blog. I tried a few options, but I am stuck. I Exported my post from my blog, but I do not see a way to Import it into the other blog. I also tried to install and use the “Insert Pages: plugin, but, according to this post, I cannot use that plugin unless I transfer my site to WordPress.org. Does anyone have any suggestions?
Thank you!
Thanks for sharing this! I think this is just what I need to create author bios at the bottom of my posts without the security risks of adding new users.
Thank you for notifying us. We have fixed the link.
You can do this and if that serves the purpose. This method is more useful when you want to manage the contents of one page separately so that when you update that page the change appears on other posts/page where you have added it.
oooh…thanks for the clarification!
I’m not sure I understand why you couldn’t just copy and paste the text from one page into the new page.(and manually update any page links) … Would you use this if you wanted to keep the format/layout of the original page? Am I misunderstanding the question?
Yes, you can do this by creating a custom template and using the_excerpt instead of the_content in your WordPress loop.
Hi,
Can you display a certain number of words rather then the full page and with a link to the full page?
Thanks for sharing the infos on this plugin, can be very useful
Mo
Hi,
Just letting you know your ‘Insert Pages plugin’ seems to be going to a 404 page…
Discussed plugin seems to be off from official repository but I found this plugin from Github github.com/uhm-coe/insert-pages. Just hit “Clone or Download” and “Download ZIP”, then upload the zip file and install.
Or I could just open both pages/posts and copy and paste…Simpler, I don’t to download and install a plugin and I already know how to do this…
In some cases, when you create a custom page template just for one particular page but only allow a simpler page for edits of the content area.
I.e. target page has all the bells and whistles you dont want to frequently edit. But a part of that page you want to have someone edit for you. You use the trick above so others can edit that content but not your layout for one particular page.