Recently one of our users asked if it was possible to add content from a WordPress page into another post or page.
Inserting page content can help save you time when doing content updates, and it also makes it easy to create custom layouts in your pages and posts.
In this article, we’ll show you how to insert page content into your posts and pages in WordPress.
Why Embed Page Content into Other WordPress Pages and Posts?
Embedding page content into other pages and posts in WordPress can save you time when updating content.
Instead of updating every page, you can simply edit one page, and it will update the content wherever it’s embedded in your WordPress website.
Beyond saving time during content updates, it also lets you create custom pages and layouts easily.
Embedding page content can be a simple way to create galleries, highlight testimonials, add a portfolio, feature videos, and more.
That being said, let’s show you how to insert page content into another page or post in WordPress.
Adding WordPress Page Content into Pages and Posts
First thing you need to do is install and activate the plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, you need to open up the post or page where you want to embed page content.
After that, click the ‘Plus’ add block icon and search for ‘Insert Pages’.
Then, click on the ‘Insert Page’ block.
Next, you can choose the page you want to embed in the menu on the right hand side of the page.
Simply enter the page URL, or search for the page in the ‘Insert Page’ section.
After that, you can fully customize how the page will display in the ‘Settings’ section.
Simply select how you want the page content to display from the ‘Display’ drop down. You can display the post title, link, thumbnail, excerpt, or even the entire page content.
Once you’re finished customizing your page or post, make sure to click the ‘Update’ or ‘Publish’ button to save your changes.
If you selected the ‘All (includes custom fields)’ display option, then here’s how it will look to your visitors.
In this example, we added a simple team bio to our blog post above the content.
Using Shortcodes to Add Page Content in WordPress
If you don’t want to use included block, then you can use shortcodes to embed page content into your pages and posts.
The plugin has shortcode parameters that let you customize the exact page content you want to display.
[insert page='page-slug|ID' display='title|link|content|all|custom-template.php']
In the shortcode above, you need to replace the
’page-slug|ID’ with your page or post slug or the post ID. To find the post ID, see our guide on how to find IDs in WordPress.
You also need to change ‘
title|link|content|all|custom-template.php’ to the type of page content you want to display.
For example, the shortcode below will display a page with the ID of ‘128’ and only the page ‘content’.
[insert page='128' display='content']
To add the shortcode, open up the post or page you want to edit, click the ‘Plus’ add block icon, and search for the ‘Shortcode’ block.
Then, click on ‘Shortcode’ to add it to your site.
Next, add the shortcode to the shortcode block on your page.
Make sure to click the ‘Update’ or ‘Publish’ button to save your changes.
Here’s how it will look to your visitors:
Adding Custom Post Types into WordPress Posts and Pages
If you’re using custom post types to organize your website content, then you can add these to your posts and pages too.
For example, you can create a custom post type for your image galleries, videos, testimonials, portfolio items, and more.
For more details, see our guide on how to create custom post types in WordPress.
After you’ve added your custom post type to WordPress, simply go to the page or post that you want to edit. Then, you can add your pages with the custom post type following the same steps as above.
Here’s an example of a page with multiple pages embedded using the ‘Books’ custom post type. Each title and thumbnail will take the visitor to a page for that book.
Using Custom Templates to Display Inserted Pages
The Insert Pages plugin also lets you customize how your inserted pages will display by creating a custom page template. This works similar to other page templates supported by your WordPress theme.
Note: This method is more advanced since it requires you to edit theme files and copy and paste code.
If you haven’t done this before, then see our beginner’s guide to pasting snippets from the web into WordPress.
We also recommend creating a WordPress backup, so you can restore your website if anything goes wrong. For more details, see our guide on how to backup and restore your WordPress site with UpdraftPlus.
After that, you can start creating your own custom page template.
First, open up a plain text editor like Notepad and name your file. It can be anything you want, like
Then, paste the following code into the blank file:
<?php /** * Template Name: Custom page template */ ?> <div id="your-wrapper-div"> <?php while ( have_posts() ) : the_post(); ?> <div id="your-container-div-for-each-post"> <?php the_content(); ?> <?php the_post_thumbnail(); ?> </div> <?php endwhile; ?> </div>
The code snippet above is a very basic template and can be fully customized to your needs.
Once you’re done customizing your template, you need to connect to your website via FTP or your WordPress hosting file manager, and then upload the file to your WordPress theme folder. For more details, see our beginner’s guide on how to use FTP to upload files to WordPress.
Next, you need to open up the page or post where you want to use your custom template.
After that, select ‘Use a custom template’ from the ‘Display’ drop down and enter the name of your custom template in the ‘Custom Template Filename’ box.
After you’re finished, make sure to click ‘Update’ or ‘Publish’ to make it live.
We hope this article helped you learn how to insert WordPress page content into another post or page. You may also want to see our guide on how to choose the best business phone services and our expert picks of the best AI chatbot software for your website.