Homepage.php

Community Forums Forums General Discussion Homepage.php

This topic is: resolved

This topic contains 1 reply, has 1 voice, and was last updated by  Joseph Lee 1 year, 2 months ago.

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

    Joseph Lee
    Participant
    Post count: 119

    I am learning Genesis.

    Many of the themes have a homepage.php. There they call sidebars with simple php. There is no need for a sidebar-x.php because the homepage is not replacing a sidebar, so you don’t need a filter/add action, right?

    However, there is nothing in the homepage.php to stop the normal sidebar from showing up on the page. The primary sidebar does not show up though. Shouldn’t  ”genesis()” bring in the primary (and secondary depending on layout) of the site?

    #17332

    Joseph Lee
    Participant
    Post count: 119

    function enterprise_home_genesis_meta() {

    if ( is_active_sidebar( ‘home-middle-1′ ) || is_active_sidebar( ‘home-middle-2′ ) || is_active_sidebar( ‘home-middle-3′ ) ) {

    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
    add_action( ‘genesis_loop’, ‘enterprise_home_loop_helper’ );
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );

    }
    }

     

    This is in my code. I am guessing the bold code is forcing the home page in to a no primary/secondary sidebar.

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

The topic ‘Homepage.php’ is closed to new replies.