• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Remove h1 / title-area in HTML4 / XHTML Theme

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Remove h1 / title-area in HTML4 / XHTML Theme

This topic is: resolved
  • This topic has 8 replies, 3 voices, and was last updated 11 years, 3 months ago by Carlo.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • January 30, 2015 at 12:00 pm #139060
    anotherusername
    Participant

    Hi all:

    Marin Real Estate Photography, Drone, Video and Matterport

    Using Agency pro 2 (which is an HTML4 / XHTML theme) how would I remove the h1 tag that is wrapped around the <title> area (which in my case wraps around an image) on the home page?

    Or how do I get rid of the whole title area on the home page?

    
    <div id="title-area"><h1 id="title"><a href="http://www.marinhomephotography.com/"></a></h1></div>

    Thanks in advance.

    http://www.marinhomephotography.com/
    January 31, 2015 at 4:09 pm #139205
    TREagans
    Member

    //REMOVE PAGE TITLES FROM SPECIFIC PAGES
    add_action( 'get_header', 'remove_titles_from_pages' );
    function remove_titles_from_pages() {
    if ( is_page(array(contact, about, home, services, courses, portfolio) ) ) {
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    }
    }


    Web Designer and Developer
    http://www.treagans.com

    January 31, 2015 at 4:39 pm #139210
    anotherusername
    Participant

    Thanks for the code.

    I am fairly certain that is for html5 code and not for XHTML sites.

    I decided to take the easy way out and used the genesis simple hooks plugin and just clicked the:

    Unhook genesis_do_header() function from this hook?

    Button.

    February 1, 2015 at 9:43 am #139270
    Carlo
    Member

    Thanks for the code.

    I am fairly certain that is for html5 code and not for XHTML sites.

    It is indeed, but that's the least of the problems with it. Using that code would have brought down your site!

    Thas, you should have tested it before posting it. Also, saying hello and introducing the code in your own words instead of just posting the code alone wouldn't hurt.

    I decided to take the easy way out and used the genesis simple hooks plugin and just clicked the:

    Unhook genesis_do_header() function from this hook?

    Button.

    Good idea.


    Comprehensive, easy to follow Genesis documentation

    February 1, 2015 at 10:48 am #139287
    anotherusername
    Participant

    Hi there, Carlo:

    Thanks for your note.

    In case anyone wants to go the simple hooks route and just use:

    Unhook genesis_do_header() function from this hook?

    Do note that you will want to probably put a div in there with a margins, since you are losing a div (sorry, off the top of my head I don't remember what the DIV Id is... maybe just #header ???).

    Hope this helps.

    February 1, 2015 at 11:28 am #139292
    TREagans
    Member

    @carlo.... I actually have this code added to my functions.php in child theme and its giving me the results I was looking for. What do you mean it would bring your site down?


    Web Designer and Developer
    http://www.treagans.com

    February 2, 2015 at 5:04 am #139365
    Carlo
    Member

    @carlo…. I actually have this code added to my functions.php in child theme and its giving me the results I was looking for. What do you mean it would bring your site down?

    I guarantee you don't. Try copying and pasting what you posted and see what happens...

    Firstly, those items in your array should be formatted as strings. Secondly, when posting code on the forum, you need to put it inside a code block (use the code button in the editor) or the string marks are auto converted into quotation marks.


    Comprehensive, easy to follow Genesis documentation

    February 2, 2015 at 11:43 am #139421
    TREagans
    Member

    @Carlo Not to argue with you or nothing, but as you can see, i'm running that code as is in my functions.php. I'm trying to use this as a learning experience. So you're saying the page names should be in quotes so that they become strings? Using the code listed removes my page titles with no issue. Soon as I add the page name to the list, the title goes away upon refresh.

    functions.php

    </TREagans>


    Web Designer and Developer
    http://www.treagans.com

    February 3, 2015 at 5:31 am #139501
    Carlo
    Member

    So you’re saying the page names should be in quotes so that they become strings?

    Yes, that's exactly what I'm saying.

    Using the code listed removes my page titles with no issue. Soon as I add the page name to the list, the title goes away upon refresh.

    Well if you look at the codex entry for is_page, it confirms that the contents of the array should be strings.

    Regardless of whether it works even if it's formatted wrong, if the asker had copied and pasted the code you posted, their site would have crashed, because the StudioPress forum corrupts code if it's not formatted as a code block.


    Comprehensive, easy to follow Genesis documentation

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Remove h1 / title-area in HTML4 / XHTML Theme’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble