WordPress.org

Ready to get started?Download WordPress

Forums

Hiding a single page title (14 posts)

  1. seomaverick
    Member
    Posted 3 years ago #

    I'm using a page, as my homepage and left the title blank. As I want an image in it's place.

    I cannot find a way, to hide the title of only this one page.

    I've tried adding a custom field hide_title value "true" but that didn't work.

    Any ideas how I can hide this one title? There is no way I can do it via css, as it will effect the other page titles. The gap it's creating at the top of my post is driving me nuts!

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    in some themes, pages have individual css ids or classes (through the use of 'body_class()' and/or 'post_class()) which you can use in the css to hide elements of a particular page.

    however, you haven't given enough info to verify this.

    link to your site?

  3. seomaverick
    Member
    Posted 3 years ago #

    In this theme, it doesn't unfortunately.

    However, in a stroke of genius, I thought I'd try...

    <style>
    h2.pagetitle
    {
    display: none !important;
    }
    </style>

    And it worked perfectly. The html is still in the code, but it's not getting in the way of my design.

    Hope this helps the next person searching for an easy solution.

  4. CarlSpackler
    Member
    Posted 3 years ago #

    seomaverick,
    I'm wondering where you posted that code? Did you post it into the style.css, or somewhere else? I can't seem to make this work, and I just want to hide the Home title, but leave all other pages as-is.
    Thanks.

  5. seomaverick
    Member
    Posted 3 years ago #

    Hey, add that to the actual page (post), whichever you're using as your static homepage.

  6. seomaverick
    Member
    Posted 3 years ago #

    Also ensure your theme uses the same class, you may need to alter the style slightly.

  7. owgu
    Member
    Posted 2 years ago #

    I am a newbie to WordPress (I am a Joomla person) so I put it together today since I dont like to use titles (all of the time). It's pretty easy (it has to be since I haven't ever used WordPress until today).
    First I used Firefox to see what the tag name was for the title. I use Yootheme so the tag was h1.title. I used the "custom fields" area in the "page" to create the name "css" with a value of "h1.title { display:none !important; }". I saved it and went to my template (I am using Yoothemes so it is extremely easy at this point) If you are using Yoothemes templates open up template.config.php and paste in the following code right under "$css = '.wrapper { width:........" (around line 16).

    $myid=get_page( $page_id );
    if(get_post_meta($myid->ID, 'css', true) ){
    $css .= get_post_meta($myid->ID, 'css', true);
    }

    Now anytime you use the name "css" it will be included in your style sheet. If you use any other name it will just pass it by for whatever you would like to use it for.

    If you arent using a Yootheme theme (you should... I recomend them for WordPress and Joomla), you should be able to use my steps and seomaverick's steps (for the "page custom fields") and make it work.

  8. CarlSpackler
    Member
    Posted 2 years ago #

    Thanks. Both of these helped out a lot!

  9. stewx
    Member
    Posted 2 years ago #

    for me it was the Widgetkit plugin from Yootheme, disabled it and viola...

  10. WeirdMike
    Member
    Posted 2 years ago #

    Worked like a charm!

  11. mjefferson96
    Member
    Posted 2 years ago #

    woohoo!! It worked Thank you!!! I was pulling my hair out trying to hide the title on my wordpress home page too! Thank you soooooooo much. My theme was built with Artiseer and the code in html view needed to look like this
    <style>
    h2.art-postheader
    {
    display: none !important;
    }

    Thanks again!

  12. faucetboy
    Member
    Posted 2 years ago #

    Here's another method, when the home page is where you want to hide the post/page title:

    I'm not sure if this holds true across all themes, but with many themes at least, WordPress give the body tag on the home page a class of "home". So I was able to hide the static page title on just the home page with this:

    body.home .entry-title {
    	display: none;
    }

    I've found that body.home rule to be a good way to control the look of all sorts of things on just the home page.

  13. Vera Schafer
    Member
    Posted 2 years ago #

    The code suggested by seomaverick worked for me as well, but then it disappears from the menu. What am I doing wrong?

  14. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Please post a new topic and include a url to your site.

Topic Closed

This topic has been closed to new replies.

About this Topic