• Resolved Ceecee

    (@chargalli)


    I want to remove the page title for my “About/Home” page in the 2014 theme, but keep all titles on remaining pages. I’ve scoured through topics and have found one topic, but it removes all titles–see below. But that’s not what I want to do.

    .page h1.entry-title {
    display: none;
    }
    /*hides the page title*/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Do not edit the Twenty Fourteen theme. It is the current default WordPress theme and having access to an original, unedited, copy of the theme is vital in many situations. First create a child theme for your changes. Or install a custom CSS plugin.

    Thread Starter Ceecee

    (@chargalli)

    Thanks, I’ve edited the style css with the above code and it worked fine, didn’t corrupt the theme, however, I’m looking for answers on how to remove the home page title or about page title while leaving the rest of the pages and blog titles intact.

    You should always include a link to your site when asking a question; it makes it easier to offer specific instructions. But here are some general ones that you can use.

    Each post and page is assigned a unique ID called the post ID (posts & pages are essentially the same, it’s just that pages are a special kind of post). If you view the source of any of your single pages or posts, and look for the body element (it will begin with <body), you will see several classes assigned to it, one of which contains this numeric post ID. Pages will have a class name in the format page-id-# while posts will have a class name in the format postid-# (where # is some number). You can also find out what the post ID is by going into the post or page editor of the page/post that you are interest in; the post ID will be in the address bar of your browser.

    So once you find out what the class name is of the body element for the page that you want to target, then all you have to do is add it to the beginning of your CSS selector so it only targets that page. For example, let’s say your About page has a post ID of 123. You would modify the rule so that it looks like this:

    .page-id-123 h1.entry-title {
       display: none;
    }

    Now, the Home page may not have a post ID if you have a blog/index as your home page (instead of a static page). That’s because a blog page isn’t really a single page or post, but a collection of posts. However, the home page will have a special class assigned to the body element called … (wait for it …) home! So to target the CSS for the home page, you add the .home class to the beginning of your selector like this:

    .home h1.entry-title,
    .page-id-123 h1.entry-title {
       display: none;
    }

    So this rule should only affect entry-titles on the home page and the page which has a class of page-id-123.

    Note: the period at the beginning of a selector means it’s a class name, as opposed to an ID, which would use a pound sign # (or hashtag as it’s now known).

    Thread Starter Ceecee

    (@chargalli)

    Thanks–here’s the link galliinsurance.com
    I want to remove the “About” on the front page only.

    OK, so if it’s just on the home page, then the only selector you need to use is the one for the .home class:

    .home h1.entry-title {
       display: none;
    }

    As esmi pointed out earlier, you should not edit your theme’s style.css file directly. Not because you might corrupt the theme, but if the theme ever gets updated because of a bug fix, feature enhancement, or security patch, then your changes will be lost. And it’s not uncommon for a theme to be updated. Instead, I recommend using a CSS plugin like Custom CSS Manager, and adding your CSS that way.

    Thread Starter Ceecee

    (@chargalli)

    I installed the CSS plugin as you suggested, and it worked! Thanks a ton CrouchingBruin!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘2014 Theme Page Title’ is closed to new replies.