[wp-hackers] Ticket #4267 - 'the_title' Filter

Andy Staines andy at yellowswordfish.com
Tue Jan 8 21:48:57 GMT 2008


I am hoping someone might be able to suggest a workaround for the  
above problem I raised a while  back. In short, sometime after 2.1.3,  
'the_title' filter was added to wp_list_pages(). The result is that if  
you run a filter on 'the_title' to change the title of a specific page  
and wp_list_pages() is being used (on a navbar or sidebar) then ALL  
page titles get changed.

Testing in the filter to confirm that the current page being displayed  
is the one you want to modify so that your code runs will, of course,  
test positive for every call to the filter - hence all page titles get  
corrupted.

Can anyone think of a way that I can isolate the one page I need to  
change and make the change without effecting all other page listings?  
Sure be grateful for any suggestions...

Thanks
Andy


More information about the wp-hackers mailing list