[wp-trac] Re: [WordPress Trac] #7533: is_page() Returns false Always In Search Results

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 9 13:52:37 GMT 2008


#7533: is_page() Returns false Always In Search Results
-----------------------------------------+----------------------------------
 Reporter:  GamerZ                       |        Owner:  anonymous
     Type:  defect                       |       Status:  new      
 Priority:  high                         |    Milestone:  2.7      
Component:  Template                     |      Version:  2.6.1    
 Severity:  trivial                      |   Resolution:           
 Keywords:  is_home, home, dev-feedback  |  
-----------------------------------------+----------------------------------
Comment (by Otto42):

 Replying to [comment:11 GamerZ]:
 > It is a search archive and hence both pages and posts are searched and
 then the information is processed within the loop. Both pages and posts
 are displayed within the archive and at the moment there is no way to tell
 apart from them.

 `if (get_post_type($post) == 'page') ...`

 I can see adding a get_the_post_type() function, because we're in the
 Loop, but not changing the nature of the is_page value.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7533#comment:12>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list