[wp-trac] [WordPress Trac] #34513: is_single() or is_singular() are not running filters on the queried object

WordPress Trac noreply at wordpress.org
Fri Oct 30 21:51:29 UTC 2015


#34513: is_single() or is_singular() are not running filters on the queried object
--------------------------+------------------------------
 Reporter:  LindsayBSC    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  4.3.1
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+------------------------------
Changes (by mark-k):

 * keywords:   => close


Comment:

 You are probably doing it wrong. is_singular return true with the page
 that is being handled is singular and it will still be true everywhere
 during the processing of the page no matter in which specific loop you are
 at the moment.
 You probably need to remove the filter after it is used the first time, or
 check if your current loop is the main loop.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34513#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list