[wp-trac] Re: [WordPress Trac] #9760: global $post->ID id of first search result in searches

WordPress Trac wp-trac at lists.automattic.com
Fri May 8 13:07:49 GMT 2009


#9760: global $post->ID id of first search result in searches
-------------------------------------+--------------------------------------
 Reporter:  d.busby                  |        Owner:            
     Type:  defect (bug)             |       Status:  closed    
 Priority:  normal                   |    Milestone:  Unassigned
Component:  Plugins                  |      Version:  2.7.1     
 Severity:  normal                   |   Resolution:  invalid   
 Keywords:  $post, post, id, search  |  
-------------------------------------+--------------------------------------
Changes (by hakre):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 the $post variable is populated on multiple points with different values.
 there is no strict rule at which point that variable must or must not have
 a certain value as you are trying to do for the search.

 it might help you to checkout [http://codex.wordpress.org/Conditional_Tags
 Conditional Tags] documentation in codex to find some code that is
 checking for various requests (or queries) in wordpress.

 i must say that is not a bug. please consider codex or the forums to get
 help with plugin evelopment.

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


More information about the wp-trac mailing list