=== Improved Include Page === Contributors: Marios Alexandrou Donate link: https://infolific.com/technology/software-worth-using/include-page-plugin-for-wordpress/ Tags: include, include content, include html, include pages, nested content, include other pages, include other content Requires at least: 5.0 Tested up to: 5.9 License: GPLv2 or later Improved Include Page plugin allows you to include the content of a page in a template file or a post/page (via a shortcode) with several options. == Description == Improved Include Page (IIP) uses the WordPress Shortcode API to include the content of any page inside any other page or post. = Using a shortcode in a post/page: = [include-page id="123"] OR [include-page id="/about/resume"] = Using PHP in a template = For more details and examples, see the Installation tab. Improved Include Page is an enhanced version of the original Include Page developed by Brent Loertscher. = Key Features = * Page title can be displayed with optional HTML code * Content can be displayed with different styles (full, teaser, custom 'more' link) * WordPress filters are applied to both the content and the title * Supports the WordPress Shortcode API == Installation == 1. Download Improved Include Page 2. Extract the zipped archive 3. Upload the file 'iinclude_page.php' to the 'wp-content/plugins' directory of your WordPress installation 4. Activate the plugin from your WordPress admin 'Plugins' page. 5. Include pages in your templates using 'iinclude_page' function or in your pages/posts using the shortcode syntax. = How To Use = Once installed, the plugin adds the function 'iinclude_page': void **iinclude_page**(int post_id [,string params, boolean return = false]) The function takes three parameters: 1. the id of the page to include ('post_id') 2. an optional string ('params') which contains the display options 3. an optional boolean ('return') tells whether to return the content or display it on screen. = Example 1: using Shortcode API in posts or pages = You can include a page's content in a page/post using the syntax: [include-page id="123"] or [include-page id="3" displayTitle="true" displayStyle="DT_TEASER_MORE" titleBefore="
DT_TEASER_MORE - Teaser with 'more&' link (default)DT_TEASER_ONLY -Teaser only, without 'more' linkDT_FULL_CONTENT - Full content including teaserDT_FULL_CONTENT_NOTEASER - Full content without teaser
']'
or you will have a PHP Warning
* Fixed a bug in the displayTitle attribute: using "false" you will get a real boolean false and title is hidden
* Added a new WP action 'include-page' to use inside your PHP code
''
* Edited class attribute for the 'more' link. Now it is 'more-link' and 'iip-more-link'
= 0.4.7 =
* On WP 2.5 or greater allows custom inclusion by post type and status using parameters 'allowType' and 'allowStatus'.
* Bug fix: in shortcode fixed a bug that could crash PHP when including recursive page/posts
= 0.4.6 =
* Bug fixed: since this version you can include only static pages with status of 'published'.
= 0.4.5 =
* Page ID can be a valid page path (WP 2.1 or higher required) with contribution by Guy Leech.
= 0.4.4
* Added parameter $return (default = false) to iinclude_page() function
* Added support for WP 2.5.x shortcode API
= 0.4.3 =
* The code of this version it's been cleaned and optimized using WordPress API.
= 0.4.2 =
* This version fixes a bug that triggers an error when used with some content filter: the '$page' global variable is backed up and then restored before returning.
= 0.4.1 =
* This version contains a bug fix by [Jesse Plank](http://www.funroe.net/): resolves a compatibility problem with the plugin [EventCalendar](http://blog.firetree.net/2005/07/18/eventcalendar-30/).