Remove page title from pages / blog posts

Hello: How do I remove the page titles from appearing in the actual pages and blog posts?

  • DavidM
    • DEV MAN’s Mascot

    Hi randit,

    You'll find the page titles in question in the /studio/library/functions/loop-functions.php file. There are several different lines to consider, depending on if you're using BuddyPress or not.

    As you recently mentioned you're not using BuddyPress, I'll just list the non-BuddyPress info.

    For pages, on line 208 you can simply delete the following (or simply delete the whole line):
    <h2 class="pagetitle"><?php the_title(); ?></h2>

    And for posts, on line 74 you can delete the contents of that line as follows:
    <h2 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', TEMPLATE_DOMAIN ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

    You could also hide the elements with CSS for a quicker but ill-advised solution.

    h2.pagetitle{ display:none;}
    h2.posttitle{ display:none;}

    Cheers,
    David

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.