[wp-trac] [WordPress Trac] #25749: Recent change in post type rewrite tags ('name' vs 'pagename' query vars) results in incorrect is_single()

WordPress Trac noreply at wordpress.org
Mon Oct 28 19:45:55 UTC 2013


#25749: Recent change in post type rewrite tags ('name' vs 'pagename' query vars)
results in incorrect is_single()
--------------------------+------------------------------
 Reporter:  boonebgorges  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Post Types    |     Version:  3.7
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by SergeyBiryukov):

 Codex currently says that
 [http://codex.wordpress.org/Function_Reference/is_single is_single()]
 checks if a single post of any post type except `'attachment'` and
 `'page'` is being displayed, and
 [http://codex.wordpress.org/Function_Reference/is_page is_page()]
 specifically checks for pages.

 After [25182], it looks like `is_single()` would only return true for non-
 hierarchical post types, and `is_page()` would work for any hierarchical
 type. So we should either fix that or update Codex.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25749#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list