[wp-trac] [WordPress Trac] #18750: specify post ID for is_page_template
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 22 16:45:46 UTC 2011
#18750: specify post ID for is_page_template
--------------------------+-----------------------------
Reporter: billerickson | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
is_page_template() checks the $wp_query object for the page ID. It would
be great if we could override this with our own ID as a separate variable:
is_page_template( $template, $id );
Two instances where I've used this today:
- In a page template to see if the current page's parent is also using the
template
- Limiting metaboxes to display only if a certain page template is used
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18750>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list