Support » Fixing WordPress » Don't display titles on pages

  • Resolved hpgray

    (@hpgray)


    I am trying to hide the titles on several of the pages on my website. I don’t want to delete the reference to the title because I want it to remain there for SEO, but I don’t want the title to show on the page.

    Here is one of my pages: http://www.cakeinthemorn.com/categories/

    Any thoughts? I tried adding this code to CSS, but it didn’t work…

    .page-id-11 .h1{display: none;}

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • esmi

    (@esmi)

    Forum Moderator

    body.page-id-11 #main-content h1{display: none;}

    The code should be

    .page-id-11 h1 {display: none;}

    removing the data for h1, because it’s a tag, not a class name.

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Esmi’s code works just fine.
    Greater specificity improves accuracy of CSS.

    Oh you guys are fast! Thanks! It worked great!

    As a total aside, I seem to have something coded into my theme that outputs my title both as an H1 title and an H2 title. I have no idea why it is like that and I am going to try and remove it–unless it isn’t a good idea? Does having the same information in both H1 and H2 create duplicate information for SEO? Why would the theme creators have the title go into both H1 and H2 formats, both displayed at the top?

    Strange…

    Thanks for your help!

    I’ve looked all over for this and can’t get anything to work. I’m using a child theme and only want to add CSS code to get the title of the page removed. The codes above didn’t work when added to my child theme’s style.css file. The site is at http://www.tooaks.co/mobilemenu/

    I don’t want it to have the “primary content” title.

    Any ideas why the code wouldn’t work for me?

    @rseaver06

    Please create a new topic for your problem so someone can help you, because this thread is for supporting hpgray’s issue only.

    Oh, sorry I saw that his problem got resolved so I thought I’d ask here. No problem, I’ll create it now, thanks!

    You are welcome!

    Ok, it’s here: http://wordpress.org/support/topic/cant-hide-titles?replies=1#post-3121116 if you have any solutions. 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Don't display titles on pages’ is closed to new replies.