• 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

Custom header for Date/home pages not loading once migrated

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 › General Discussion › Custom header for Date/home pages not loading once migrated

This topic is: not resolved

Tagged: Custom header, live site migration, page template

  • This topic has 4 replies, 2 voices, and was last updated 6 years, 10 months ago by Jeffreydotfong.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 18, 2016 at 4:15 am #185819
    Jeffreydotfong
    Member

    Hi There, I'm using genesis.

    I recently migrated my site to a live server at http://testing.fastpackjournal.com/journal/. I built it offline and used MAMP. My "Journal" or blog home page had a custom header which I named "header-Home.php". I used this code successfully in Home.php (on my locally hosted site) to load the custom header...

    add_action('genesis_header', 'load_home_page_header');
        function load_home_page_header() {
            get_header('Blog_home'); 
    }

    However, once I migrated the site live to bluehost, the Home.php index loads but NOT the header. It defaults to my header-index.php. It cannot call any other headers so it it not a header file issue. This exact call is working on my Single.php file, so I can't see how it is a code error.

    How can I get my live site to load custom headers on the index pages?

    http://testing.fastpackjournal.com/journal/
    May 18, 2016 at 5:56 am #185825
    Victor Font
    Moderator

    Did you first remove the standard Genesis header?

    remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
    remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
    remove_action( 'genesis_header', 'genesis_do_header' );

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    May 18, 2016 at 6:04 am #185826
    Jeffreydotfong
    Member

    Hi Victor,

    Yes, I have that exact code.

    The strangest bit is that it works on my locally hosted site, but not on the live server!

    Jeff

    May 18, 2016 at 6:40 am #185830
    Victor Font
    Moderator

    What's the actual name of the template file? Your local installation may not be case sensitive whereas the production server is. With the parameter you're passing to the get_header function, it will be trying to load header-Blog_home.php. Make sure the spelling is exact.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    May 18, 2016 at 3:05 pm #185867
    Jeffreydotfong
    Member

    Hi Victor,

    The file names were exact. I neglected to mention that I had a custom index header. I have solved the issue with this code in my index.php:

    // Header for home and index pages singled out...
    add_action('genesis_header', 'load_project_page_header');
        function load_project_page_header() {
            if (is_home() || is_date()) {
                get_header('Blog_home'); 
            }
            else {
                get_header('index'); 
            }
    }

    Thanks for your help! Seems to be an issue with my installation of wordpress though.

    Jeff

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ 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

© 2023 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