Problem Adding Home Page Banner Template

Community Forums Forums General Discussion Problem Adding Home Page Banner Template

This topic is: resolved

This topic contains 1 reply, has 1 voice, and was last updated by  TDogger 10 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #90025

    TDogger
    Member
    Post count: 23

    I am using Genesis 2.0.2 with the Genesis sample child theme.

    I am trying to add a banner image between the header/primary navigation bar and the content area on the home page. I set up a template with the following code.

    <?php
    /*
    Template Name: Home Page
    */
    
    remove_action('genesis_loop', 'genesis_do_loop');
    
    add_action ( 'genesis_after_header', 'flcd_add_banner', 10 ); 
    
    function flcd_add_banner() {
     
        echo '<div class="clear"></div>';
        echo '<div style="width: 1152px; height: 200px; background-color: #fff">';
        echo 'this is a reserved area for banner images';
        echo '</div>';
     
    }
     
    genesis();
    ?>

    The banner area shows up, but I lose the entire content area. Neither the title nor the content shows up, but the sidebar does display. What am I doing wrong?

    I get the same problem is I use the genesis_before_content hook.

    • This topic was modified 10 months, 1 week ago by  TDogger.
    • This topic was modified 10 months, 1 week ago by  TDogger.
    • This topic was modified 10 months, 1 week ago by  TDogger.
    • This topic was modified 10 months, 1 week ago by  TDogger.
    • This topic was modified 10 months, 1 week ago by  TDogger.
    • This topic was modified 10 months, 1 week ago by  TDogger.
    • This topic was modified 10 months, 1 week ago by  TDogger.
    • This topic was modified 10 months, 1 week ago by  TDogger.
    • This topic was modified 10 months, 1 week ago by  TDogger.
    • This topic was modified 10 months, 1 week ago by  TDogger.
    #90033

    TDogger
    Member
    Post count: 23

    Ooops. I figured it out. The tutorial I read misled me.

    It works after I removed

    remove_action('genesis_loop', 'genesis_do_loop');

    I think that is the content area.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.