• 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

Replace genesis_header with custom code

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 › Replace genesis_header with custom code

This topic is: not resolved

Tagged: genesis_header

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 2 months ago by David Chu.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • November 12, 2013 at 7:50 am #72460
    optimus203
    Member

    How do I replace genesis_header with my own code? The theme I'm using (Magazine) implements my header image in a fashion that is not desirable. Thanks in advance for the time and help.

    November 12, 2013 at 10:20 am #72483
    David Chu
    Participant

    Hi,
    The easy way is via hooks and functions. Here's a quick illustration. I'm coding off the top of my head, so have your FTP ready in case you need to correct something. ๐Ÿ™‚ First line takes out regular stuff. Next line pumps in your goodies which would be in a function:

    remove_action( 'genesis_header', 'genesis_do_header' );
    add_action('genesis_header', 'optimus_cool_function' );
    function optimus_cool_function () {
       echo "something or other";
       other lovely php commands;
    }
    

    I will also sometimes pop in an image or what-have-you into the header in a similar manner. The only mild downside of pulling the header code out is that you lose the header widget.

    Dave


    Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 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