WordPress.org

Ready to get started?Download WordPress

Forums

Getting rid of page titles... (4 posts)

  1. Atelier Carmel
    Member
    Posted 2 years ago #

    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!!!

  2. Kraignos
    Member
    Posted 2 years ago #

    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 :)

  3. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    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.

  4. Atelier Carmel
    Member
    Posted 2 years ago #

    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!!!

Topic Closed

This topic has been closed to new replies.

About this Topic