WordPress.org

Support

Support » Themes and Templates » Getting rid of page titles…

Getting rid of page titles…

  • Atelier Carmel
    Member

    @atelier-carmel

    Hi there,
    I’d like to remove the big, bold title that appears at the top of all my static pages.
    I’ve looked through the forum, and although this has already been addressed, I can’t seem to figure it out!
    My site: http://www.ateliercarmel.ca
    Using theme Twenty Eleven
    Other posts suggest removing this:

    <h2>” title=”<?php the_title(); ?>”><?php the_title(); ?></h2>

    The thing is, I can’t find any line of code that looks like this on my page.php file. Only the “get header”, the loop, and the “get footer”. Am I missing something? Or is it because of which theme I’m using? If this is the case, could anyone suggest a theme where I could do this?

    Thanks!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    In your page.php file, you shouldn’t see the loop (as you would expect on posts page), but instead :
    <?php get_template_part( 'content', 'page' ); ?>
    Basically, this means it will try to find and include the content of a file named content-page.php, and if there’s none in your theme, fallback to content.php. So in one of the files mentioned above (try content-page.php first) you should be able to find the title.
    <h1 class="entry-title"><?php the_title(); ?></h1>
    I suggest you comment this line out, instead of deleting it right away, maybe another day you’ll think it was a bad idea to remove it 🙂

    Chip Bennett
    Theme Review Admin

    @chipbennett

    1) Create a Child Theme
    2) Copy content-page.php from Twenty Ten into your Child Theme
    3) Delete the line <h1 class="entry-title"><?php the_title(); ?></h1> from your Child Theme’s copy of content-page.php.

    Atelier Carmel
    Member

    @atelier-carmel

    Hey guys,
    It worked, thank you so much! I kept looking in the page.php instead of content-page.php…
    Strangely, I wasn’t able to comment out the code, which is what I usually try first. But when I erased it it worked fine!
    Cheers!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Getting rid of page titles…’ is closed to new replies.