• Resolved huseinhusein

    (@huseinhusein)


    Hello

    I need to remove the title of the page! does anyone know how?

    i added this to my style sheet but it is still there..

    }
    .entry-title, .entry-title a {
    display: none;
    }

Viewing 6 replies - 1 through 6 (of 6 total)
  • First, it’s always a good idea to add a link to your site, so we can examine it to see if your CSS is correct. For example, is that first right brace } from a previous CSS rule, or did you really add that as part of the new rule?

    Second, are you trying to target all page titles, or just certain pages? It looks like you’re trying to hide the title on all pages.

    Third, why do you think the page titles have a class of entry-title? While that may be true for other themes, if you inspect the page title on a site using the Corpo theme using a tool like Firebug or Chrome Developer Tools, you’ll see that the page title is an h2 element without class or ID assigned to it (oddly enough). But it is the first child element of a section element with an ID of main-content, so to hide the page title on all pages, add this CSS rule:

    #main-content > h2 {
       display: none;
    }

    Thread Starter huseinhusein

    (@huseinhusein)

    I am locally hosting the website while I work on it that’s why I didn’t post a link to it! And I am fairly new to WordPress, still learning!

    And I added this to the end of the style sheet, made it look like other tags look and it still didn’t work!! Any idea why?
    What am I doing wrong?

    And I added this to the end of the style sheet…

    Are you changing the theme’s style sheet directly? You shouldn’t change any theme files in case they get updated in the future with feature enhancements or security patches. Otherwise, your changes will get overwritten when the theme gets updated (like this individual). Instead, you should either create a child theme or, if all you are doing is making CSS changes, use a CSS plugin like Lazyest Stylesheet or Custom CSS Manager (if your theme does not offer a custom CSS option).

    What theme are you using? Maybe I can install it on a test site and see what CSS you need to change. Or do a “view source” on your page and copy & paste the few lines surrounding the post title.

    Thread Starter huseinhusein

    (@huseinhusein)

    I am using the corpo theme! And thanks for the advice I will have to download that plugin!

    OK, if you are using Corpo, then that CSS selector should work. Corpo doesn’t have a custom CSS option, so I added this CSS through Lazyest Stylesheet:

    #main-content > h2 {
       color: green;
    }

    And it changed my page titles to green. You can see the effect here. I’m thinking that maybe you’ve done something to the theme’s stylesheet (style.css) that caused a syntax error and is preventing CSS rules from being correctly interpreted (maybe a missing or extra brace?). I would install a fresh copy of your theme’s stylesheet (make note of all your changes) and add your mods through a CSS plugin.

    If you are trying to hide the title of posts, though (which are similar to, but at the same time different that pages), add the selector #main-content header h2:

    #main-content > h2,
    #main-content header h2 {
       display: none;
    }

    Thread Starter huseinhusein

    (@huseinhusein)

    thank you that worked

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘title removal’ is closed to new replies.