• Hi,

    I want to hide the entry title for all my pages but, I don’t want the rule to affect posts and archive pages. How can I achieve that?
    I have already used this code

    .entry-title  {
        display: none !important;
    }

    but it has affected everything.

    Please help me.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    You can try this.

    body:not(.blog) .entry-title, body:not(.archive) .entry-title, body:not(.single) .entry-title  {
        display: none !important;
    }

    This styles all pages with .entry-title that are not blog, archive or single post pages.

    Thread Starter Graicifyd

    (@graicifyd)

    Thanks, this works

    Thanks, this works

    Nice one. Glad it works for you. ??

    Thread Starter Graicifyd

    (@graicifyd)

    Actually this solves the problem perfectly.

    .page .entry-title  {
        display: none !important;
    }

    Ah yes, That works too. ??

    And actually some users could make this work too. But this requires a Hook element. (GP Premium users)
    https://docs.generatepress.com/article/hooks-element-overview/

    .entry-title  {
        display: none !important;
    }

    But we’ll have to place this CSS within a <style></style> tag and add in on the Hook Element’s code area and hook it to wp_head or wp_footer with display rule set to Pages - all pages so it only applies to pages. ??

    This is especially useful if you want the styling to come with <script>...</script>. ??

    • This reply was modified 4 years, 2 months ago by Elvin.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘HIDE ENTRY TITLE ON PAGES’ is closed to new replies.