the_title filter only for page title display
-
Hi all,
I am writing a plugin which should disable the display of the title for a certain page. I am using the ‘the_title’ filter to hook into the title creation:
function myplugin_hide_title($title) { if (is_page(myplugin_page_name())) { $title == ''; } return $title; } add_filter('the_title', 'myplugin_hide_title');
But my callback function gets called like everywhere – in the head, in the nav_menu, etc. This seems to be intended by wordpress. But is there any way to determine that I am inside the page titles call of the_title? Conditional tags or something? Or is there a different filter hook which I have not found til now?
Thanks for your help,
durroon
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘the_title filter only for page title display’ is closed to new replies.