This plugin helps you insert a post or page from the WP posts database table within another, bring your Facebook posts and Twitter feeds to your blog.
The page-in-page plugin has a very simple mission:
Insert posts and pages within each other with no stress.
Bring your Facebook Page posts to your WP pages.
Show your Tweets in your WP blog.
It provides possibilities to use both widgets and shortcodes. If using a widget you are only able to include pages within pages but if using the shortcode, you are able to able to insert posts/pages
within other posts/pages.
For Facebook Page posts, only the first 25 most recent posts are returned and for Tweets, only the first 20 most recent tweets are returned. In future releases maybe we will include pagination for social feeds.
The settings in the widget include:
Title: Widget Title. This title will be shown as the page’s title if ‘Show page title’ option is not selected.
Page: Select the page that will be included when widget is called.
Show page title: If checked (selected) then the page title will be shown and the ‘Widget Title’ ignored.
Show title as link: If checked (selected) the title will be displayed as a link to the page.
Show page content: If checked (selected) then the page content will be included in the output.
Show featured image: If checked (selected) then the featured image will be included in the output.
Show featured image as link : If checked (selected) then the featured image will be included and linked to page in the output.
Output Template: Insert an HTML template that will be used to display content of the widget. If not provided the default template will be used
Slugs that can be used in your template are ${page_title}, ${page_content}, ${page_link}, ${page_image} . Each are self explanatory of what they will be replaced with.
The default output template is
<div class=”twl-page-in-page”>
<span class=”twl-page-in-page-title”>${page_title}</span>
<div class=”twl-page-in-page-content”>
<div class=”twl-page-in-page-image”><img src=”${page_image}” /></div>
<div class=”twl-page-in-page-text”>${page_content}</div>
</div>
</div>
With shortcodes, you can insert posts in posts, pages in pages, posts in pages and vice versa.
Settings that can be used in a shortcode are:
Note that if you are specifying a template in the shortcode, then the above settings will be ignored and the slugs you insert in your template will be replaced with appropriate content.
See a template example and allowed slugs above.
To insert a shortcode you can do one of the following:
To insert without specifying a template you can simply use
[twl_page_in id=123] OR [twl_page_in id=123 show_page_title=1].
To insert your shortcode specifying a template for page/post’s title and content use the following. You can include other supported slugs mentioned above
[twl_page_in id=123 show_page_title=1]
<h3 class=”my-awesome-title-class”>${page_title}</h3>
<div class=”my-awesome-content-class”>${page_content}</div>
[/twl_page_in]
The template specified in the [twl_page_in] tag will be used to display the page/post with the specified id when inserting it. The template is optional and if not specified then the default template will be used.
IMPORTANT!!! If you specify a template, you MUST have the slugs you want to be shown else you might get unexpected results
IMPORTANT!!! This template has to be defined when Editor is in ‘Visual’ mode and NOT in ‘Text’ mode (see screen shot). If you do not respect this you might have unexpected results because HTML tags might not be parsed properly.
However if you have escaping with magic quotes off on your server then template should be defined when editor is in ‘Text’ mode.
To insert posts from your Facebook page, Go to Admin > Settings > Page In Page Plugin and insert your facebook application credentials.
Next edit the page where you want the posts to appear and insert the short code [twl_page_in_fb]. See screenshot 3 for output.
To insert tweets from your twitter account, Go to Admin > Settings > Page In Page Plugin and insert your twitter application credentials.
Next edit the page where you want the posts to appear and insert the short code [twl_page_in_tw]. See screenshot 4 for output.
Find a bug or got any worries? well never mind just send an email to [email protected].
Future releases: Integrate same functionality across multi sites and pagination for social page feeds.
Steps to install this plugin.
Shortcode: [twl_page_in_wp id=5 show_page_title=1] where id should be the id of the WP page and show_page_title can be 1 or 0. If 1 then the post/page’s title will be shown too.
OR you can specify a template for the title and content (or with other supported slugs ${page_image}, ${page_link})
[twl_page_in id=123 show_page_title=1]
<h3 class=”my-awesome-title-class”>${page_title}</h3>
<div class=”my-awesome-content-class”>${page_content}</div>
[/twl_page_in]
Frist go to Admin > Settings > Page-In-Page Plugin and enter your Facebook or Twitter application credentials and then use any of the shortcodes below.
Facebook shortcode: [twl_page_in_fb]
Twitter shortcode: [twl_page_in_tw]