[theme-reviewers] Usage of wp_title filter.

esmi at quirm dot net esmi at quirm.net
Wed Oct 17 14:16:34 UTC 2012


I've just been reviewing the Codex page on the wp_title() filter:

<http://codex.wordpress.org/Plugin_API/Filter_Reference/wp_title>

Specifically the example quoted as best practice. When I've tried to 
implement that function, it generates a duplicated title in the RSS 
feed. This can be circumvented by changing:

return get_bloginfo( 'name' ) . $page_type . $title . $page_num;

to:

if( !is_feed() ) return get_bloginfo( 'name' ) . $page_type . $title . 
$page_num;

but I'm not 100% convinced that this is the proper usage of is_feed().

Anyone care to comment before I amend the Codex page?

Mel
-- 
http://quirm.net
http://blackwidows.co.uk


More information about the theme-reviewers mailing list