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

Jennifer Hodgdon yahgrp at poplarware.com
Wed Jan 9 01:29:11 GMT 2008


Andy Staines wrote:
> Sorry yes - I got side-tracked!
> Again - similar solution to the one Rob suggested (although I didn't 
> know you could use is_page() like that) with the same caveat - I have to 

Actually, you can't. is_page() returns true if you are viewing a Page. 
  It doesn't take an argument of a random title and return true if it 
happens to be the title of a page.

     --Jennifer

> run a query to get the page title. But thanks for the response. All 
> suggestions welcome!
> andy
> 
> On 9 Jan 2008, at 01:07AM, Williams Phillip wrote:
> 
>> Sorry if you already got this but I am not sure that the first one 
>> made it through.
>>
>> How about something like:
>>
>> function filter_current_page_title( $title) {
>>     if (is_page( $title) ) {
>>         return "new title";
>>     }
>> }
>> add_filter('the_title', 'filter_current_page_title');


-- 
Jennifer Hodgdon

Poplar ProductivityWare * www.poplarware.com
Web Databases/Scripts * Modeling/Analysis/Palm OS Software



More information about the wp-hackers mailing list