i4w_getpage

Usage:

This shortcode enables loading data from any page or post record in your WordPress database.
It offers a means of duplicate content on alternate pages with a different set of permissions but without the need to maintain several content sources.

Furthermore, by allowing content parts to be drawn from several different pages and posts, it extends the CMS capabilities of WordPress.

This shortcode does NOT supports conditional branching with [ELSE_getpage].
Shortcode nesting is NOT supported.

Parameters:

id The page or post ID from which to fetch the specified field data. Required: Yes.
field The field name whose data is to be fetched for the given page/post ID. Required: No, default to ‘post_content’.
status Defines the post/page status required in the “post_status” field for the “get” to take place. Required: No, by default, no filter is applied.
excerptfb (Excerpt Fallback) Defines when a fallback to the excerpt is made if the post/page status is not met. Please note that this ONLY applies to the post_content field. Required: No.

Example:

[i4w_getpage id='1234' field='post_title']
[i4w_getpage id='1234' field='post_content']
[i4w_getpage id='1234' field='post_excerpt']
[i4w_getpage id='1234' field='post_excerpt' status='publish']
[i4w_getpage id='1234' field='post_excerpt' status='publish' excerptfb='1']

Notes:

Please excercise care and ensure that “Page 1” is not pulling content from “Page 2”, which itself is pulling content from “Page 1”.

API:

To use this shortcode in your own PHP code, please use as follows:

'1234', 'field'=>'post_title' ) );
$my_content = i4w_getpage( array( 'id'=>'1234', 'field'=>'post_content', 'status'=>'publish' ) );
$my_excerpt = i4w_getpage( array( 'id'=>'1234', 'field'=>'post_excerpt' ) );
?>