This shortcode enables loading data from any page or post record in your WordPress database.
It offers a means of duplicating 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 support conditional branching with [ELSE_page].
Shortcode nesting is NOT supported.
|id||The page or post ID from which to fetch the specified field data.
|field||The field name whose data is to be fetched for the given page/post ID.
|status||Defines the post/page status required in the “post_status” field for the “get” to take place.
|excerpt_fb||(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.
[mbr_page id='1234' field='post_title'] [mbr_page id='1234' field='post_content'] [mbr_page id='1234' field='post_excerpt'] [mbr_page id='1234' field='post_excerpt' status='publish'] [mbr_page id='1234' field='post_excerpt' status='publish' excerptfb='1']
To use this shortcode in your own PHP code, please use as follows:
$my_title = mbr_page( array( 'id'=>'1234', 'field'=>'post_title' ) ); $my_content = mbr_page( array( 'id'=>'1234', 'field'=>'post_content', 'status'=>'publish' ) ); $my_excerpt = mbr_page( array( 'id'=>'1234', 'field'=>'post_excerpt' ) ); </code>
Please excercise care and ensure that “Page 1” is not pulling content from “Page2”, which itself is pulling content from “Page 1”.