Remove Page Titles

  • qdevsuite


    Hi All, My question is on removing page titles. I know you can remove them using the custom CSS

    .post-title, .post-title a, .post-title a:visited {
    display: none;

    But now if I click on a parent page which lists all the sub pages underneath I lose the page titles which I want to keep.

    Any idea how I can amend the CSS to keep the page titles when a parent page is selected, and remove the title when a page is opened.

    Hope this makes sense.




    Provide me with the two links showing both pages; the “actual page” and it’s “parent page”.



    Here are the links. I currently have the option for page titles switched off

    Link to a page

    Link to the parent



    Okay. Go ahead and re-enable the page titles again.

    We are probably going to have to use a conditional in php to check if the page being rendered is a single page. Something like:

    if (is_page()) {
    ?><style type="text/css"> <!-- .post-title, .post-title a, .post-title a:visited {display: none;} --></style><?php

    Are you using a child theme?


    Kenneth John Odle



    .single .post-title,
    .single .post-title a,
    .single .post-title a:visited {
    display: none;




    Good call, Ken. I modified my code above. is_single() is for a post, while is_page() is for a page.

    So, using the same logic… this might work just using css:

    .page .post-title,
    .page .post-title a,
    .page .post-title a:visited {
    display: none;

    Not sure… but definitely easier than custom php.



    Thanks Josh, but the CSS code displays the page title in both the page and Child pages.



    Try this,

    .post-title, .post-title a, .post-title a:visited {
    display: none;

    .child-page .post-title, .post-title a {
    display: block !important;



    Sorry no that didn’t work. The pages titles are all there still. Thanks Prasanna



    try this to remove non-link post titles

    .post h1 {
    display: none;

Viewing 10 posts - 1 through 10 (of 16 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.
Graphene Themes Forum