Title: Page In Page
Author: Cyril
Published: <strong>11 de novembre de 2013</strong>
Last modified: 24 de febrer de 2014

---

Cerca extensions

Aquesta extensió **no s’ha provat en les darreres 3 versions majors del WordPress**.
Segurament no està mantinguda o suportada, i pot tenir problemes de compatibilitat
quan s’usa en versions recents del WordPress.

![](https://s.w.org/plugins/geopattern-icon/page-in-page.svg)

# Page In Page

 Per [Cyril](https://profiles.wordpress.org/tcyr/)

[Baixa](https://downloads.wordpress.org/plugin/page-in-page.2.0.3.zip)

 * [Detalls](https://ca.wordpress.org/plugins/page-in-page/#description)
 * [Ressenyes](https://ca.wordpress.org/plugins/page-in-page/#reviews)
 *  [Instal·lació](https://ca.wordpress.org/plugins/page-in-page/#installation)
 * [Desenvolupament](https://ca.wordpress.org/plugins/page-in-page/#developers)

 [Suport](https://wordpress.org/support/plugin/page-in-page/)

## Descripció

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.

### Usage

#### Using the widget

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>

#### Using shortcode

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:

 * id : The ID of the page/post you want to insert
 * show_page_title: should the page title be displayed? (Can be 1 for true or 0 
   for false. Defaults to 1)
 * show_page_content: should the page title be displayed? (Can be 1 for true or 
   0 for false. Defaults to 1)
 * show_title_as_link: Can be 1 for true or 0 for false. Defaults to 0. If set to
   1, the page title will be displayed as a link to the page/post
 * show_featured_image: Can be 1 for true or 0 for false. Defaults to 0. If set 
   to 1, the page’s featured image will be included
 * show_featured_image_as_ink: Can be 1 for true or 0 for false. Defaults to 0. 
   If set to 1, the page’s featured image will be included as a link

**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.

### What Next?

Find a bug or got any worries? well never mind just send an email to cyril.tata@hotmail.
com.

Future releases: Integrate same functionality across multi sites and pagination 
for social page feeds.

### 2.0.3

 * Remove non-GPL compatible jquery isotope library

#### 2.0.2

 * **Important** In the widget, the «title template» and «content template» fields
   have been unified to «output template». Template specification in editor remains
   unchanged but more slugs added.
 * More settings added
    - show page title (shortcode parameter: show_page_title. Can be 1 or 0)
    - show page title as link (shortcode parameter: show_title_as_link. Can be 1
      or 0)
    - show page content (shortcode parameter: show_page_content. Can be 1 or 0)
    - show featured image (shortcode parameter: show_featured_image. Can be 1 or
      0)
    - show featured image as link (shortcode parameter: show_featured_image_as_link.
      Can be 1 or 0)
 * If an output template is specified, then the settings above are ignored so all
   necessary slugs should be specified in output template.
 * Slugs to be used in templates: **${page_title}**, **${page_content}**, **${page_link}**,**
   ${page_image}** .
 * Usage of namespace for twitter SDK removed due to complaints for PHP < 5.3 (this
   change is only for those who have not been able to use the twitter shortcode)
 * Some code re-factoring

#### 2.0.1

 * code re-factoring

#### 2.0

 * Add possibility to include **posts** from a facebook page.
 * Add possibility to include tweets from a twitter timeline.
 * Include new shortcodes: **[twl_page_in_wp]** for inserting a WordPress page, **[
   twl_page_in_fb]** for inserting Facebook posts and **[twl_page_in_tw]** for inserting
   user tweets.

#### 1.0

 * Initial version of plugin

## Captures

 * [[
 * Widget settings (see ‘Usage’ section of the readme.txt file for explanations)
 * [[
 * Using shortcode (with template) in editor
 * [[
 * Facebook posts listing
 * [[
 * Twitter post listing

## Instal·lació

Steps to install this plugin.

 1. In the Zip file, there is a folder with name ‘page-in-page’
 2. Upload the ‘page-in-page’ folder to the ‘/wp-content/plugins/’ directory
 3. Activate the plugin through the ‘Plugins’ menu in WordPress
 4. Read the usage instructions below (or go to ‘Other Notes’ section)

## PMF

  What is the shortcode used to insert a page using the WP editor

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]

  What shortcodes should I use to insert Facebook posts and Twitter tweets in my
WP page

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]**

## Ressenyes

No hi ha ressenyes per a aquesta extensió.

## Col·laboradors i desenvolupadors

«Page In Page» és programari de codi obert. La següent gent ha col·laborat en aquesta
extensió.

Col·laboradors

 *   [ Cyril ](https://profiles.wordpress.org/tcyr/)

[Traduïu «Page In Page» a la vostra llengua.](https://translate.wordpress.org/projects/wp-plugins/page-in-page)

### Interessats en el desenvolupament?

[Navegueu pel codi](https://plugins.trac.wordpress.org/browser/page-in-page/), baixeu-
vos el [repositori SVN](https://plugins.svn.wordpress.org/page-in-page/), o subscriviu-
vos al [registre de desenvolupament](https://plugins.trac.wordpress.org/log/page-in-page/)
per [fisl de subscripció RSS](https://plugins.trac.wordpress.org/log/page-in-page/?limit=100&mode=stop_on_copy&format=rss).

## Meta

 *  Versió **2.0.3**
 *  Darrera actualització **fa 12 anys**
 *  Instal·lacions actives **200+**
 *  Versió del WordPress ** 3.0.1 o posterior **
 *  Provada fins a **3.7.41**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/page-in-page/)
 * Etiquetes
 * [page](https://ca.wordpress.org/plugins/tags/page/)[post](https://ca.wordpress.org/plugins/tags/post/)
   [shortcode](https://ca.wordpress.org/plugins/tags/shortcode/)[widget](https://ca.wordpress.org/plugins/tags/widget/)
 *  [Vista avançada](https://ca.wordpress.org/plugins/page-in-page/advanced/)

## Valoracions

 4.3 sobre 5 estrelles.

 *  [  3 valoracions de 5 estrelles     ](https://wordpress.org/support/plugin/page-in-page/reviews/?filter=5)
 *  [  0 valoracions de 4 estrelles     ](https://wordpress.org/support/plugin/page-in-page/reviews/?filter=4)
 *  [  0 valoracions de 3 estrelles     ](https://wordpress.org/support/plugin/page-in-page/reviews/?filter=3)
 *  [  1 valoració de 2 estrelles     ](https://wordpress.org/support/plugin/page-in-page/reviews/?filter=2)
 *  [  0 valoracions de 1 estrelles     ](https://wordpress.org/support/plugin/page-in-page/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/page-in-page/reviews/#new-post)

[Visualitzeu totes les ressenyes](https://wordpress.org/support/plugin/page-in-page/reviews/)

## Col·laboradors

 *   [ Cyril ](https://profiles.wordpress.org/tcyr/)

## Suport

Teniu quelcom a dir? Necessiteu ajuda?

 [Visualitza els fòrums de suport](https://wordpress.org/support/plugin/page-in-page/)

## Feu una donació

Voleu ajudar a què l’extensió millori?

 [ Feu una donació a aquesta extensió ](http://goo.gl/m4r02B)