Title: http-syndication
Author: vthierry
Published: <strong>August 15, 2014</strong>
Last modified: October 25, 2023

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

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

# http-syndication

 By [vthierry](https://profiles.wordpress.org/vthierry/)

[Download](https://downloads.wordpress.org/plugin/http-syndication.zip)

 * [Details](https://twd.wordpress.org/plugins/http-syndication/#description)
 * [Reviews](https://twd.wordpress.org/plugins/http-syndication/#reviews)
 *  [Installation](https://twd.wordpress.org/plugins/http-syndication/#installation)
 * [Development](https://twd.wordpress.org/plugins/http-syndication/#developers)

 [Support](https://wordpress.org/support/plugin/http-syndication/)

## Description

This plugins offers the following “ground” functionnalities:

    1. Display the content of a post or page without any header, sidebar and footer.
 *  1. Importing the content from an external web site
 *  1. Importing an internal content of the wordpress site
 *  1. A few other deprecated functionalities

#### 1. Displaying a post or page without any header, sidebar and footer

In order to render the raw content of a post or page without any header, sidebar
and footer use the link:

    ```
    http://#mywordpressadress?httpsyndication&p=#post_or_page_id&title=#1_or_0
    ```

where:

 * `#mywordpressadress` is the wordpress web site adress.
 * `#post_or_page_id` is the post or page id (you can read the post id in the http
   link when you edit the post).
 * `#1_or_0` defines whether the post title (enclosed in a `<h1>` HTML tag) is displayed(
   default is `1`, i.e., true).

_Remarks:_

 * In this text all words prefixed by `#`, e.g., `#tag` or `#id` correspond to a
   variable, e.g., `#tag` means any tag name or `#id` means an ID label.
 * The post content is exported after filtering.

#### 2. Importing the content from an external web site

In order to import an external a post or page contents in another post or page, 
use the following shortcode:

    ```
    [import url="#external_resource_location" ]
    ```

where:

 * `#external_resource_location` is the external web site http location.

Inside the `[import ..]` shortcode, the following options allows to select and adjust
the content to import:

 * Content selection:
    - `body=1` : in order to only import the `<body..>..</body>` part of the `<html
      ><head>..</head><body..>..</body></html>` page.
    - `tag_id=#id` : only extract the content of the 1st tag of the given id, i.
      e. the `<#tag id="#id">..</#tag>` part, where `#tag` is any tag (e.g., `div`,`
      span`, ..).
    - `tag_class=#class` : only extract the content of the 1st tag of the given 
      class, i.e. the `<#tag class="#class">..</#tag>` part, where `#tag` is any
      tag (e.g., `div`, `span`, ..); the value `#class` can be a regex to deal with
      multiple defined classes.
    - `tag_name=#name` : only extract the content of all tags of the given name,
      i.e. the `<#name ..>..</#name>` part (for code safety only 100 tags can be
      extracted).
 * Content filtering:
    - `noscript=1` : in order to delete all `<script..>..</script>` parts, avoiding
      any active JavaScript running from the imported HTML.
    - `raw_href=1` : in order to provide raw href values, instead of properly relocating
      relative href in the source HTML code, as done by default.
    - `mediawiki=1` : adds the `?printable=yes&action=render` query to the URL, 
      in order to properly syndicate mediawiki sites.
    - `style=#style` or `class=#class` allows to encapsulate the content in a `<
      div .` with customized class and/or style attribute.

_Example_ :

 * `[import url="http://localhost/wordpress/?cat=4687" tag_id="content" style="width:
   100%"]` allows to import a category rendering with another page.

_How can i know with __id_, _tag_ or _class_ to select?

 * Display the page you want to import and consider the part of the page you want
   to select
 * Use the right-button to select _Inspect_ or _Inspect Element_ in the context 
   menu, that will show the page source at the choosen position
 * Look around to find the _<div_ or any other container with the proper _id_, _tag_
   or _class_ (providing it is the first tag or class of this kind in the text)
 * Then report the attribute value in your import short-code

_Remarks:_

 * If the external content can not be read, an error message is produced in the 
   page output.
 * The external content target page must be written in correct HTML (e.g., attributes
   value must be between quotes), otherwise the parsing may fail.
 * This functionality requires the `allow_url_fopen` option to be validated in the
   PHP configuration, otherwise an error message is produced in the page output.
 * By construction the import is “dynamic”, i.e., each time the page is loaded, 
   the external content is queried and inserted in the page. Good news, to be sure
   to have an updated information. Bad news, if the external web site is down or
   slowed down. You may consider having a [cache mechanism](https://wordpress.org/plugins/wp-super-cache)
   to overcome related caveats.
 * The external HTML content is imported with its external CSS class styles. For
   another WordPress site, the match is expected to be good. If this is an exotic
   content management system, the situation is less obvious: Local CSS patch is 
   likely required, or some additional content filter has to be hooked.
 * There is no way to prevent from infinite syndication loops between sites (e.g.,
   a site with a page importing an external page that itself import the inquiring
   page).
 * Unless using `noscript=1`, the external JavaScript code is imported. Though security
   flaws are normally not to be expected considering usual JavaScript security rules,
   clearly malicious code can easily hugely perturb the page rendering.
 * The [embed](https://codex.wordpress.org/Embeds) shortcode is a core WordPress
   feature. It can embed content from many resources via direct link, and the [iframe](http://www.w3schools.com/tags/tag_iframe.asp)
   allows to safely and obviously include any external site page in “frame”. The
   [iframe plugin](https://wordpress.org/plugins/iframe) works well and properly
   make the job. The present import is a 3rd alternative, to be preferred when the
   former fail or mixing pages content is required.

#### 3. Importing an internal content of the wordpress site

In order to import a post or page contents in another post or page, use the following
shortcode:

 * `[import id="#post_or_page_id"]` to include the filtered content of another post
   or page in the current content.
 * `[import id="#post_or_page_id" content=1]` to include the raw (with shortcode
   expanded, but not content filter applied) of another post or page in the current
   content (to be used only if required).
 * `[import id="#post_or_page_id" title=1]` to include the title of another post
   or page in the current content.

where:

 * `#post_or_page_id` is the post or page id (you can read the post id in the http
   link when you edit the post).

_Remarks:_

 * This avoids spurious import, e.g. of social media buttons (contrary to usual 
   [include plugins](https://wordpress.org/plugins/search.php?q=include)).
 * Shortcode recursion is managed (i.e. stopped when an infinite loop is detected).

#### 4. A few other deprecated functionalities

These additonal functionalities are deprecated but still available for backward 
compatibility

 * Using the `?w=#id` query allows to refer any page, post or archive by its numerical
   index.
 * Using the `[import wform=1 label="#theinputlabel"]` shortcode, allows to insert
   a small input field to switch to any page, post or archive given its numerical
   index.
 * Using the `[import banner="#page_id" url="#external_url"]#link-text[/import]`
   shortcode allows to display another site page in an iframe, with a banner from
   this site sitting on top of the external page. Inside the `[import ..]` shortcode,
   the following options allows to adjust the behavior.
    - `header=false` : in order to include or not the usual site header().php on
      the top of the banner
    - `height=1000` : in order to adjust the height of the frame for very long external
      pages.
    - `newtab=1` : in order to open the page and banner in a new browser window.
    - `style="border:none;"` : in order to adjust the height of the frame for very
      long external pages.

## Installation

_Manual installation_

 1. Download the [ZIP](http://sparticipatives.gforge.inria.fr/wp-plugins/index/http_syndication.zip)
    file.
 2. In your WordPress `Dashboard -> Plugins -> Add new` page choose `upload plugin 
    in .zip format via this page`
 3. Browse and select the http_syndication.zip to upload
 4. Activate the plugin through the ‘Plugins’ menu in WordPress

_Automatic installation_

 1. In your WordPress `Dashboard -> Plugins -> Add new` page search for _http syndication_
 2. Install the plugin and activate it through the ‘Plugins’ menu in WordPress

## Reviews

![](https://secure.gravatar.com/avatar/a807e563c9759b74b4616575958a74d05686bc47f5245ee63259f0edea99120c?
s=60&d=retro&r=g)

### 󠀁[works perfectly](https://wordpress.org/support/topic/works-perfectly-1371/)󠁿

 [Kevin Grabher](https://profiles.wordpress.org/kevingrabher/) February 19, 2018

Works perfectly for embedding content even on local installs from different servers.

![](https://secure.gravatar.com/avatar/41a6f27c19b94a0c67bfd7b6898212276c2e5ccd9e1a8738ae7e673ece464789?
s=60&d=retro&r=g)

### 󠀁[Worked first time…once my shortcode was correct](https://wordpress.org/support/topic/worked-first-timeonce-my-shortcode-was-correct/)󠁿

 [greataussiewebdesigns](https://profiles.wordpress.org/greataussiewebdesigns/) 
September 3, 2016

Thank you for this great plugin and please keep the updates coming. I followed your
instructions to the letter and modified the page I was pulling the information from….
and viola! With the syndicated page I used there was no other way of implementing
the code. This little plugin of yours bypassed the headache…:)

 [ Read all 2 reviews ](https://wordpress.org/support/plugin/http-syndication/reviews/)

## Contributors & Developers

“http-syndication” is open source software. The following people have contributed
to this plugin.

Contributors

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

[Translate “http-syndication” into your language.](https://translate.wordpress.org/projects/wp-plugins/http-syndication)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/http-syndication/),
check out the [SVN repository](https://plugins.svn.wordpress.org/http-syndication/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/http-syndication/)
by [RSS](https://plugins.trac.wordpress.org/log/http-syndication/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.8

Improve the documentation.

#### 1.7

Improve the introduction of style or class in import.

#### 1.6

Add the title option of the offering content to other sites
 Reorganize the doc 
page, and update code accordingly Declare deprecated some features, still available.

#### 1.5

Now wrap with iframe and embed
 Better support of remote pages parsing

#### 1.4

Add the refering content by tiny URL functionnality

#### 1.3

Adapt the shortcode parsing to editor that escape ‘&’

#### 1.2

Add the `[import banner=..]` shortcode functionality.

#### 1.1

Adding the `[import ..]` shortcode functionality.

Uses the [monkeysuffrage/phpuri](https://github.com/monkeysuffrage/phpuri) open 
PHP library for converting relative URLs to absolute, thanks!

#### 1.0

Nothing special with this trivial plugin, debugged with WP_DEBUG.

## Meta

 *  Version **1.8**
 *  Last updated **2 years ago**
 *  Active installations **10+**
 *  WordPress version ** 3.0.1 or higher **
 *  Tested up to **6.4.8**
 *  Language
 * [English (US)](https://wordpress.org/plugins/http-syndication/)
 * Tags
 * [export](https://twd.wordpress.org/plugins/tags/export/)[feed](https://twd.wordpress.org/plugins/tags/feed/)
   [rendering](https://twd.wordpress.org/plugins/tags/rendering/)[syndication](https://twd.wordpress.org/plugins/tags/syndication/)
 *  [Advanced View](https://twd.wordpress.org/plugins/http-syndication/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/http-syndication/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/http-syndication/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/http-syndication/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/http-syndication/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/http-syndication/reviews/?filter=1)

[Add my review](https://wordpress.org/support/plugin/http-syndication/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/http-syndication/reviews/)

## Contributors

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

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/http-syndication/)