This simple guide shows you the way to insert WordPress content into anywhere within a website. That makes it much easier to embed content, link, custom field or anything on a page to other pages and merge two posts into one without losing any information. To simplify matters, we select Insert Pages plugin as the method.
Install Insert Pages Plugin on Your Website
Insert Pages is a popular plugin designed for inserting one WordPress page into another by using shortcode API. That allows users to insert pages for multiple purposes. For example, create assignment due date and change the date by modifying a shortcode. Also, this plugin is commonly used to standardize video size so as to make all videos with the same length.
Start with plugin installation and get to know more features of Insert Pages plugin. Go to WordPress dashboard > Plugins > Add New and search for this plugin. Install and activate this plugin.
Since you have the Insert Pages plugin installed on your website, a new function called “Insert Page” is shown in the visual editor toolbar. Edit a post or page and check if there is such a function available.
Insert WordPress Page into Another One
Create a new post/page via Posts/Pages > Add New or edit an existing one. This post or page is where to place the inserting content. Once accessing to the visual editor, click the “Insert Page” button in the toolbar. And then, a box called “Insert page” pops up, which list all pages and posts included in your website.
If you cannot find out the target post, then type the post title in the search bar and seek the post out. Click the post title and then expand the Options list to customize the page slug or ID. That is according to your personal needs.
The Display field is where to determine what content will be inserted into the new page. That can be all content (including custom fields), content, link, title, excerpt, etc. Perhaps, you can use a custom template if the default one cannot meet your needs. Finally, click “Insert Page” button to have all settings done.
Having confirmed the settings, a line of shortcode is generated automatically as the following example. Preview the post on website frontend and check if there is something wrong with the content. If not, update or publish this post.
By the way, we would like to introduce a practical use of this plugin, namely, creating due date for the time-specific posts. Before everything, create a custom post type and name it as Due Date or something else. Create a due date under this post type and call it Task 1 Due Date or any other names as needed. Type a specific date as its content.
Since everything is ready, open each time-specific post in the visual editor and click “Insert Page” button. Select the Due Date post you have created just now and click “Insert Page”. Insert the due date to each targeted post. In this case, a line of shortcode like [insert page=’task-1-due-date’ display=’content’] is generated automatically.
If there is a need to change the due date, you just need to edit the due date post. In this way, the due date inserted into other posts will be modified in real time.