WordPress.org

Ready to get started?Download WordPress

Forums

How to remove page titles (7 posts)

  1. webmind
    Member
    Posted 4 years ago #

    How can I remove page titles? One guy said to add the following line to my stylesheet:

    div.post-headline {display:none;}

    So I did that and my stylesheet looks like this:

    /*
    .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    }

    .alignleft {
    float: left;
    }

    .alignright {
    float: right;
    }

    div.post-headline {display:none;}

    Unfortunately, it does not seem to have made any changes to the style of the website, particularly with respect to the page titles. They still appear as before.

    Any suggestions as to what I'm doing wrong, or how I can remove page titles from appearing at the top of the center page block? I think they look stupid and redundant. Thanks!

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    A link to your site might help...

  3. webmind
    Member
    Posted 4 years ago #

    Hi esmi,

    It's me again. Sorry I missed you last time, and forgot the link!

    http://www.newsuperhuman.com

    PS. Do you do consulting work? I'm looking for a good WordPress consultant to help me install and maintain sites.

  4. syncbox
    Member
    Posted 4 years ago #

    Comment out the code in your index or page template: <?php the_title(); ?>

    You can delete it but commenting it out leaves it there in case you change your mind.

    Personally, I wouldn't do this. A page title is a good thing for SEO, since it generally repeats what is in the title tag and semantically is high in the heirarchy of what's considered by search engines.

    HTH

  5. syncbox
    Member
    Posted 4 years ago #

    BTW, you place // in front of the function to comment it out (inside the php tag) or wrap it with /* */

  6. esmi
    Forum Moderator
    Posted 4 years ago #

    I agree with syncbox. You need the page heading to be available for search engines but there might be a way to take it off the page in graphical browsers but still leave for the engines. Try adding the following to the bottom of your stylesheet:

    .post h2,.page h2 {
    position:absolute;
    top:-5000px;
    left:-5000px;
    }

    And in answer to your earlier question, yes, I'm a professional developer. If you need to get in touch with me, see http://quirm.net/contact/

  7. leftoutshadow
    Member
    Posted 4 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic