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

Peter Westwood peter.westwood at ftwr.co.uk
Wed Jan 9 08:43:38 GMT 2008


On Tue, January 8, 2008 9:48 pm, Andy Staines wrote:
> 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...

Issues like this are why I raised this ticket [1] - now I just need to go
through and make some changes :-)

[1] http://trac.wordpress.org/ticket/4893

westi
-- 
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
 C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5


More information about the wp-hackers mailing list