[wp-trac] Re: [WordPress Trac] #6345: Function to return single
post / page ID
WordPress Trac
wp-trac at lists.automattic.com
Mon Mar 24 05:57:56 GMT 2008
#6345: Function to return single post / page ID
--------------------------+-------------------------------------------------
Reporter: Viper007Bond | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.7
Component: General | Version: 2.5
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+-------------------------------------------------
Comment (by Otto42):
Why not this?
if (is_single()) $id = get_query_var('p');
else if (is_page()) $id = get_query_var('page_id');
--
Ticket URL: <http://trac.wordpress.org/ticket/6345#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list