• 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

Header snippet

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 › Header snippet

This topic is: not resolved
  • This topic has 12 replies, 3 voices, and was last updated 13 years, 1 month ago by DavidF.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • June 1, 2013 at 1:13 am #43436
    DavidF
    Member

    Hi All,

    I want to add a header to a Premise landing page.

    Does anyone know the correct header snippet I should add to my custom code?

    Thanks

    David


    David Frosdick WordPress Coaching

    June 1, 2013 at 1:28 am #43438
    Mahesh
    Member

    Taken from genesis code snippets. Brian also has code snippets.

    /** Add support for custom header */
    add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 100 ) );

    June 1, 2013 at 5:52 am #43446
    Brad Dalton
    Participant

    If you want all landing pages to use a header, you can simply remove this coce from the landing page template in your child theme.

    // Remove header, navigation, breadcrumbs, footer widgets, footer 
    remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
    remove_action( 'genesis_header', 'genesis_do_header' );
    remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
    

    Or you can copy the existing landing page, rename it and rename the file name and remove the above code so you can then choose from 2 landing pages to use.

    One with a header and one without.


    Tutorials for StudioPress Themes.

    June 1, 2013 at 3:43 pm #43513
    DavidF
    Member

    Thanks for these post but I couldn't get them working.

    What I want to do is just add a header or a div to my "landing" page only.

    I tried using simple hooks but it applies the my code on all pages even when using code to show on the home page it seems to not tak that rule when premise landing page is set as the home page.

    Thanks for any help.


    David Frosdick WordPress Coaching

    June 1, 2013 at 9:58 pm #43558
    Brad Dalton
    Participant

    Which theme are you using David? Link to your site please.


    Tutorials for StudioPress Themes.

    June 2, 2013 at 2:40 am #43585
    DavidF
    Member

    I'm using Epik theme for the blog but Premise landing page is the static home page.

    Premise has a custom function option to insert code for this reason but their support didn't help first time around. I might go back to them.

    Thanks

    David


    David Frosdick WordPress Coaching

    June 2, 2013 at 3:52 am #43588
    Brad Dalton
    Participant

    I tested this code David and it works:

    You will need to grab the page i.d from the source code and replace the 007 in the code with your own.

    Another option is to replace the conditional tag with:

    if ( is_front_page () )
    or 
    if ( is_home () )
    

    Code not displaying? Grab it on Github.

    You can then insert your header image in a new post draft and grab the HTML for the image which needs to be replaced in between the div tags.

    You can style the header using the new class and also use the advanced image settings to style the image.

    You could even add the header image using CSS code.


    Tutorials for StudioPress Themes.

    June 3, 2013 at 3:16 am #43776
    DavidF
    Member

    Thanks Brad.

    It's not working, I tried all option of post id home and front page. I have this in my Premise custom functions area:

     

    <?php function add_header_specific_page() {
    if(is_page(750) )
    echo '<img class="aligncenter size-full wp-image-32533" alt="header" src="http://127.0.0.1:4001/wordpress/wp-content/uploads/2013/06/header1.png" width="700" height="69" />';
    }
    /**
    * @author Brad Dalton - WP Sites
    * @learn more http://wpsites.net
    */
    add_action('genesis_header', 'add_header_specific_page');
    ?>

     

    Even viewing the source I don't see the image inserted. So to clarify I'm adding just a header to Premise landing page 750 and leave all other stuff in place. I'll ask Premise support as well.

    Dave


    David Frosdick WordPress Coaching

    June 3, 2013 at 4:04 am #43780
    DavidF
    Member

    Even using the simple hooks plugin and the following code doesn't load for a Premise page.

    Tried front page, home page and page Id

    <?php if( is_front_page () ) : ?>
    hi
    <?php else : ?>
    <!---<div id="optin2">Join Us</div>--->
    <?php endif; ?>

     

     


    David Frosdick WordPress Coaching

    June 3, 2013 at 4:36 am #43782
    Brad Dalton
    Participant

    Hello David

    Sorry to hear you are having problems.

    Please link to your site and i'll check your home page for you.

    The code I provided and tested is different to the code you embedded above.

    Please copy and paste the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++.

    The code will not work if you modify it by adding PHP tags or by pasting it into the Simple Hooks plugin.

    The only changes should be made for the page i.d

    You will need to use the correct page i.d for your home page in order for the code to work.


    Tutorials for StudioPress Themes.

    June 3, 2013 at 5:18 am #43785
    DavidF
    Member

    Hi Brad,

    The child theme functions don't come into play with Premise. Premise has it's own custom function area.

    Dave


    David Frosdick WordPress Coaching

    June 3, 2013 at 6:05 am #43790
    DavidF
    Member

    I've contacted Premise support and explained the issue. See if they can help. Thanks for your time Brad.


    David Frosdick WordPress Coaching

    June 13, 2013 at 1:53 pm #45720
    DavidF
    Member

    Just an update. Premise is a little limited for what I was trying to do. Thanks for all you help!

    Dave


    David Frosdick WordPress Coaching

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and 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