Include Content Slice

Use a shortcode to include a file (or just a part of a file by using text delimiters) into the current post from any URL, or from the local server.

Author:Brett Mellor (profile at wordpress.org)
WordPress version required:3.3.1
WordPress version tested:3.3.2
Plugin version:0.2
Added to WordPress repository:23-04-2012
Last updated:29-05-2012
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:1
Plugin URI:http://ecs.mit.edu/
Total downloads:2 510
Active installs:100+
plugin download
Click to start download

The Include Content Slice plugin provides a shortcode you can use to include content in your WordPress site from another URL, or from a local file on your server. This could be posts and pages from your own site, another WordPress site, other blog sites, or any other page or file for which you have the URL. You can control what part (a "slice") of the source content you would like to include by wrapping it in begin and end tags, possibly containing regular expressions, or you can just include complete files.

Begin and end tags are used in the source content to define what portion of the content you would like to include. (In this context, the word 'tag' refers to something like an html tag or comment, or some other reasonably unique delimiter that marks the beginning and ending of some portion of text. It does not mean tag in the sense of post taxonomy.)

Typically, the source page is some HTML page and the delimiting string or tag will be in the form of an HTML comment. The plugin will look for and use the default delimiter tags <!--slice begin--> and <!--slice end--> in the source content. You can also specify your own begin and end tags as shortcode options. The begin and end tags do not need to be in the form of an HTML comment. They can be almost any text string found in the source content. The tags are case sensitive. Your tags will be interpreted as regular expressions, therefore you should not use characters like ^ $ . * + ? | () [] {} unless you are intending to use regular expressions. See "Other Notes".

The most common application for this plugin is for reposting all or part of a post from one WordPress site to another WordPress site. The plugin was originally developed so that content could be edited in a single location and then included on other sites, in whole or in part, without having to be retyped. In this way, any changes made to the source page automatically appear on the other sites on which the source content is included. The source page does not need to be a WordPress post. It can be any web page or text file, from a remote server or from a local disk.

Please see "Other Notes" tab for additional usage instructions and examples.

The Include Content by URL plugin makes use of the PHP Client URL Library (CURL). CURL is built-in to PHP since PHP version 4.0.2 which has been around for over a decade so you are unlikely to run into problems. This plugin does NOT make use of the file_get_contents() function.