• Resolved jeffrey262

    (@jeffrey262)


    I was using a plugin to remove the page titles from my website. The plugin was interfering with my Turbo Tabs plugin. Now I have page titles on each page.

    I located this code and placed it in my child theme, nothing happened

    .entry-title {
    display:none;
    }

    I tried this one also:

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

    Nothing happened.

    Here is a link to my site. Any help would be greatly appreciated.
    https://www.mobilitysolutionsconsultant.net

Viewing 3 replies - 1 through 3 (of 3 total)
  • In your theme’s rendered HTML it has a <header> element with the class of “entry-header”. In your CSS you can then hide this element (which has the page and post titles) with a css bit like this:

    .entry-header{
    display:none;
    }

    This will hide all HTML elements with the class of “entry-header” so make sure this does what you want/need. If you only wanted it to impact pages, you can use the following CSS snippet:

    .page .entry-header{
    display:none;
    }
    Thread Starter jeffrey262

    (@jeffrey262)

    I added the code into my child theme. No change. Do I have to copy the header.php into my child theme then add the code you referenced?

    No you don’t need to copy the header.php template file into your child theme unless you’re doing something with PHP programming logic specific for your header.

    I took a look at the site again and noticed an issue – your child theme’s css stylehseet has PHP code in it – you can’t do that. PHP code needs to be in .php files so the php interpreter can actually go through and parse it. So take out that <php> code out of your stlesheet and put the css code I provided into it, and things should work better! Browsers will stop parsing CSS when they run into unknown code inside the stylesheet which is why the css snippet I provided didn’t “work” – basiclaly browsers ran into the PHP code and stopped parsing the stylesheet, thus missing the code snippet I provided you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Ho to remove page titles from all my pages’ is closed to new replies.