Need help? Check out our Support site, then


Removing page titles from text area

  1. I've created a website using the Mystique theme and on some pages I don't want the page title to appear in the text area e.g. on the home page I don't want "home" to appear just above my text. I copied this from a forum:

    h2.page-title {
    display:none;
    }

    which has successfully removed it from the home page but I want to remove the page titles from some of the other pages (not all). How do I do this? I'm not sure how to specify which pages I want to remove it from.

    The blog I need help with is sarahhurst.wordpress.com.

  2. Each page gets assign and ID, and on WordPress.com the ID is used to set a class name on the body tag for each page so you can style it just like you've described you would like to do.

    Let's look at an example. Take the contact page:
    http://sarahhurst.wordpress.com/contact/

    If you check the page source for that page using your web browser, you'll notice that the body tag has several classes in a space-separated list:

    <body class="page page-id-107 page-template page-template-page-nosidebar-php logged-in admin-bar custom-background typekit-enabled no-sidebar highlander-enabled highlander-light customize-support" data-twttr-rendered="true">

    One of the classes is "page-id-107" and that means you can use that class to apply CSS just to that page since it's a unique ID. So, you can turn the page title back on even though you've turned it off for other pages by adding this:

    .page-id-107 .page-title {
    	display: inline;
    }

    Alternately, you could remove the CSS you added before to remove titles on all pages and just turn off titles one page at a time if you'd like.

Topic Closed

This topic has been closed to new replies.

About this Topic