-1

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

1

How about hiding the title with CSS?

.entry-title {
  display: none;
}
  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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