Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Hello attempting to remove the title from static front page using the following code is (not working) in my functions.php

    function remove_page_title() { if (is_front_page() )
{
      add_filter( 'the_title', '__return_false' );
}}

IS there something missing? Thanks in advance

PS I know I can hard code it in to my page template with

<?php if(!is_front_page()) { ?><h2><?php the_title(); ?></h2><?php } ?>

but I'd rather not change the template

share|improve this question

1 Answer 1

How about hiding the title with CSS?

.entry-title {
  display: none;
}
share|improve this answer
    
a good fallback solution thank you but am really after a php solution to learn. Thanks again though –  James Dec 16 '11 at 21:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.