WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How To Hide Page Title On Static Homepage - Esplanade Theme (29 posts)

  1. musicalmedley
    Member
    Posted 2 years ago #

    I'm working with the Esplanade theme and I can't figure out how to hide the page title on my static homepage. Can you do that with custom CSS? It would be awesome to just add some code to the custom CSS section in the theme options.

    I've been searching in these forums for basic help, but what I'm finding is out of date or I'm doing something wrong. My knowledge of CSS and HTML is limited, but I can easily add code if you have some suggestions. Thanks for the help!

  2. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    Suggest posting a link to your site so someone can see the code in order to help. Yes, it can be done with CSS - start by reading this and setting up Firebug which is the best way to work with CSS.

  3. musicalmedley
    Member
    Posted 2 years ago #

    Thanks for those links. That will take me a while to sift through, but it's going to be good to know. In the meantime, here's my site:

    austinshadduck.com

  4. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    try:

    .entry-header {
    display: none;
    }

    If you only want to hide it on the home page do this:

    .home.entry-header {
    display: none;
    }
  5. musicalmedley
    Member
    Posted 2 years ago #

    The first one works and hides all page titles, but hiding the page title on just the home page does not work. Do you have another suggestion for that?

  6. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    Try:

    .page-id-233 instead of .home

  7. musicalmedley
    Member
    Posted 2 years ago #

    So the first line would be .page-id-233.entry-header {? That doesn't work. But if I use .page-id-233 and leave off entry-header then my home page disappears completely (or, rather, it displays as a blank page).

  8. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    Yes, the first line is what I had in mind -- but no go, huh? Try this one:

    .page-id-233.entry-header.h1

  9. musicalmedley
    Member
    Posted 2 years ago #

    .page-id-233.entry-header.h1 {
    display: none;
    }

    That doesn't do it either, assuming I don't have to clear my cache before I see the effect. Where does the page id number come from?

  10. Daniel Tara
    Member
    Posted 2 years ago #

    You need to put a space between the class selectors like this:

    .page-id-233 .entry-header .h1 {
    display: none;
    }
  11. Daniel Tara
    Member
    Posted 2 years ago #

    You have serious security issues on your website. I can download any file by simply accessing the url.

    Make sure the PHP extension is on, code gets executed and change all your credentials before someone hacks your site.

  12. musicalmedley
    Member
    Posted 2 years ago #

    I just noticed this and I have no idea what's going on... What do you mean PHP extension is on? I haven't changed anything on my site recently except the header images, but everything was running smoothly last night. I can't login to the admin panel because of this.

  13. Daniel Tara
    Member
    Posted 2 years ago #

    Contact your hosting provider.

  14. musicalmedley
    Member
    Posted 2 years ago #

    Yep, did that and they're checking it out. Thanks for the code correction in your first post.

  15. musicalmedley
    Member
    Posted 2 years ago #

    The site's back up and issues are resolved! Thanks for the help. So what works is:

    .home .entry-header {
    display: none;
    }

    Adding space between .home and .entry-header did the trick.

  16. musicalmedley
    Member
    Posted 2 years ago #

    One more question... The tabs in my browser display the page titles, except for the homepage and the blog. The homepage displays the full website url, which is fine by me, but the blog displays as Blog[Site Title]|[Tagline]. How can I tweak the code to get the browser tab to display as Blog when I'm on that section of the website?

  17. jsarvey
    Member
    Posted 1 year ago #

    I have read multiple postings dealing with how to hide "Home" or the page title on the home page. I see the recommendation the recommendation for what code to add. However, I don't know where within the style.css file to add it.

    Could you clarify?

  18. jsarvey
    Member
    Posted 1 year ago #

    I just tried adding it at the very bottom of style.css and it worked. Generally, when suggestions are made for adding a piece of code, it would be helpful it the suggestion included where within a file to add it even if that meant the bottom of the page.

  19. musicalmedley
    Member
    Posted 1 year ago #

    The original question was asked in relation to the Esplanade theme, which has a custom CSS section in its options. Adding custom CSS in this case does not require the user to go into style.css to make changes.

  20. Daniel Tara
    Member
    Posted 1 year ago #

    What you are suggesting is bad SEO practice. You shouldn't hide with CSS <h1>..<h6> tags. Preferably you shouldn't hide anything.

    What you should do is clone your page.php file into something like template-no-title.php, then add this to the beginning of the file:

    <?php /* Template Name: No Title */ ?>

    And delete the line

    <h1 class="entry-title"><?php the_title(); ?></h1>

    Then select the template from the page editor. Voila, page with no title.

  21. cbm
    Member
    Posted 1 year ago #

    Hi Thank you everyone for posting. I have tried all of this and I can't seen to hide the page title on the static page. Do I type all the stuff you have all mentioned earlier into the page.php section? Please help, this is extremely frustrating. http://www.peninsulaguitar.com

    Thank you so much for your help!

  22. jsarvey
    Member
    Posted 1 year ago #

    There were several suggestions made throughout the thread.
    Don't do them all at the same time.

    The simplest one, and one that I found worked for me was to simply paste:

    .page-id-XX .entry-title { display: none; }

    into style.css at the bottom. Where it says "XX" replace with the actual page-id number of your home page.

  23. cbm
    Member
    Posted 1 year ago #

    Thank you jsarvey. What is and where can I find the page-id number?

    Thank you!

  24. cbm
    Member
    Posted 1 year ago #

    I tried this and it still doesn't seem to make it disappear. I can't figure out what i am going wrong.

  25. jsarvey
    Member
    Posted 1 year ago #

    It looks gone to me.
    Or are you referring to the breadcrumbs: "You are here: Home" ?
    Are you trying to turn off breadcrumbs on just the home page?

  26. bboldt
    Member
    Posted 1 year ago #

    I am struggling with the same problem. I DO NOT want the page title to show on the page. I have tried other suggestions of adding - visibility: hidden; & display: none; at the bottom of

    }
    .page-title {
    color: #000;
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 36px 0;

    and

    #content .entry-title {
    color: #000;
    font-size: 21px;
    font-weight: bold;
    line-height: 1.3em;
    margin-bottom: 0;

    and it didn't work.

    The above suggestion

    .page-id-XX .entry-title { display: none; }

    would suggest it needs to be done for every page. Is there a global fix??

    Development site is http://ehub31.webhostinghub.com/~scoldi5/

    Open to suggestions.

  27. MHG webmaster
    Member
    Posted 1 year ago #

    .entry-header {
    display: none;
    }

    worked fine for me, since I wanted to remove the title from all pages.

    I had resolved the issue by editing my page.php file, but am much happier with WPyogi's custom css approach. Thanks for posting that!

    Theme author - since a lot of people appear to be struggling with this, maybe you can add an option to turn off page titles in your next update, as many themes already do.

  28. kwcheah
    Member
    Posted 1 year ago #

    Yup, thanks to this that my problem was also solved.

  29. Snorker
    Member
    Posted 1 year ago #

    WPyogi:

    Thank you! You gave the gift that keeps on giving: useful code!

    .entry-header {
    display: none;
    }

    Worked like a charm! :D

Topic Closed

This topic has been closed to new replies.

About this Topic