Skip to main content

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.

[ELSE_getpage] conditional branching is NOT supported.

Shortcode nesting is NOT supported.

Parameters

ParameterDescriptionDefaultRequired
idThe page or post ID from which to fetch the specified field data.NoneYes
fieldThe field name whose data is to be fetched for the given page/post ID.post_contentNo
statusDefines the post/page status required in the "post_status" field for the "get" to take place.NoneNo
excerptfb(Excerpt Fallback) Defines when a fallback to the excerpt is made if the post/page status is not met. This ONLY applies to the post_content field.NoneNo

Example

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

Notes

warning

Please exercise care and ensure that "Page 1" is not pulling content from "Page 2", which itself is pulling content from "Page 1".