• Did anyone every discover a filter for removing page titles (not blog titles or site titles) in the default WordPress themes?

    That’s the one thing I could never figure out, or get right.

    I’m only interested in filters. No plug-ins or modifying PHP.

Viewing 12 replies - 1 through 12 (of 12 total)
  • I don’t know about a filter, but a bit of CSS would seem to do the trick.

    .yourclass h3 {
    display:none;
    }

    HI,
    I would like to remove page title as well as teh path appearing like:
    Home » Contact

    Would you please help me. Any thing to do please….

    Thread Starter Brandon Moner

    (@ctvonline)

    @ spiderwisp

    I value your help, but that would remove the title of posts as well. And since I plan to have a blog feature, that simple will not do.

    I’d really really like to know the filter for this. Any long-time experienced WP coders out there?

    Thread Starter Brandon Moner

    (@ctvonline)

    Searched for a week and apparently there is no filter for it.

    I’ve been reduced to using CSS I guess (which I knew how to do, just didn’t want to do it):

    .entry-header {
    display: none;
    }
    
    .post .entry-header {
    	display:block;
    }

    First hides the page title header. The second brings back post title headers.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What do you mean by ‘filter’, an option in the dashboard?

    Thread Starter Brandon Moner

    (@ctvonline)

    @andrew Nevins Member

    Well if filter applies to the Dashboard only then no.

    ‘m not 100 on filters versus hooks, but I was looking for something that I could add into my functions.php file in order to remove page titles without affecting blog post titles.

    I didn’t want to use css, alter any already created php pages, nor use plug-ins.

    I’m not quite sure what you are trying to accomplish.

    Perhaps this is what you are looking for:

    <style>
    .post-title
    {
    display: none !important;
    }
    </style>

    A page is nothing more than a custom post type, so if you want to specifically target pages, you’ll need some php or you can try using the page id in your css:

    <style>#post-111 h2 {display: none;}</style>

    Thread Starter Brandon Moner

    (@ctvonline)

    @spiderwisp

    The problem is already resolved. Even though I didn’t want to use css, I accomplished what I needed to do via this css code (that I have listed above):

    .entry-header {
    display: none;
    }
    
    .post .entry-header {
    	display:block;
    }

    With this code, all titles for pages are gone, but the titles for posts still remain like I want them. This is what i was trying to get done via a filter or hook from the functions.php file instead though.

    What is it you don’t get though?
    You know when you have a page called “Home”, and theres a big “Home” title right on the page on the front end? That’s what I was trying to get rid of using a hook/filter.

    You only have that title on your page if you have a page template that uses the_title(). I don’t see why you wouldn’t just remove it from your theme. Are you using a child theme?

    Edit: Your question was also initially confusing, because the page title is what you see in your browser’s tab, not necessarily what is posted within the page template, your heading tag.

    Thread Starter Brandon Moner

    (@ctvonline)

    @spiderwisp

    Yes. I’m creating a child theme for Twenty Twelve.

    I am having the same issue:

    I’m using Path theme – and I can’t seem to rid myself of the .entry-title large “Home” or “About” titles on the top of my pages.

    I’ve tried using the CSS method describe above and it doesn’t work!!!

    Here’s what the Path theme CSS looks like:

    /* Post titles. */
    .entry-title {
    margin-bottom: 1em;
    }
    .singular .entry-title,
    .error-404 .entry-title {
    margin-bottom: 0;
    padding-bottom: .5em;
    }
    .singular-post .entry-title,
    .format-standard .entry-title,
    .singular.attachment-image .entry-title {
    margin-bottom: .5em;
    padding-bottom: 0;
    }
    .singular .entry-title a {
    }
    .home .format-link .entry-title,
    .archive .format-link .entry-title {
    margin-bottom: 1em;
    }
    .singular-attachment .entry-title {
    text-align: center;
    }

    Is there anyway to remove the title with a functions.php hook?

    @isgriff – no your issue is not the same – you are not using the same theme. Please post your own thread in your theme’s forum:

    http://wordpress.org/support/theme/path

    Including a link to your site would be useful for CSS questions.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Filter to Remove Page Title’ is closed to new replies.