[wp-trac] Re: [WordPress Trac] #5746: Add id of the post to the 'the_post' filter

WordPress Trac wp-trac at lists.automattic.com
Sun Jul 27 08:57:13 GMT 2008


#5746: Add id of the post to the 'the_post' filter
-----------------------------------+----------------------------------------
 Reporter:  henrikmelin            |        Owner:  anonymous
     Type:  enhancement            |       Status:  new      
 Priority:  normal                 |    Milestone:  2.9      
Component:  General                |      Version:  2.3.2    
 Severity:  normal                 |   Resolution:           
 Keywords:  2nd-opinion has-patch  |  
-----------------------------------+----------------------------------------
Comment (by DD32):

 Hm.. I've actually got a use for this now.. - I've got a the_title filter
 which is used to add a prefix to blog posts based on the categories of the
 post.

 The issue is that when displaying the title outside of the loop, The
 filter function doesnt have a clue what post its supposed to be applying
 the filter to.

 Places where its used outside of the loop include custom loops on the
 homepage, or in sublists within the blog page (Which is a place AFAIK, you
 do not want to have an extra loop to prevent mucking up its parent?)

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


More information about the wp-trac mailing list