Registering Sidebar (enterprise)

Community Forums Forums General Discussion Registering Sidebar (enterprise)

This topic is: not resolved

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

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

    Joseph Lee
    Participant
    Post count: 136

    This is the code from Enterprise that registers sidebars (that comes with theme)

    genesis_register_sidebar( array(
    ‘id’ => ‘home-bottom-1′,
    ‘name’ => __( ‘Home Bottom #1′, ‘enterprise’ ),
    ‘description’ => __( ‘This is home bottom #1 section.’, ‘enterprise’ ),
    ) );

    What is the ‘enterprise’ in the name for? What does this do? I am installing a sidebar with the following code:

    genesis_register_sidebar( array(
    ‘id’ => ‘rets-sidebar’,
    ‘name’ => ‘Rets’,
    ‘description’ => ‘This is the bottom left column in the sidebar.’,
    ) );

    This code is normal. It doesn’t have the ‘enterprise’ in the name. Do I have to put it in there to work with the child theme enterprise?

    What does ‘enterprise’ do?

    #17388

    Joseph Lee
    Participant
    Post count: 136

    add_action( 'get_header', 'child_sidebar_logic' );

    /**

     * Remove Lifestyle bottom sidebars, and swap in a different sidebar instead of

     * the default sidebar.

     *

     * @author Jennifer Baumann

     * @link http://dreamwhisperdesigns.com/?p=1034

     */

    function child_sidebar_logic() {

        if ( is_page_template( 'page_blog.php' ) || is_archive() || is_single() ) {

            remove_action('genesis_after_sidebar_widget_area', 'lifestyle_include_bottom_sidebars');

            remove_action( 'genesis_after_content', 'genesis_get_sidebar' );

            add_action( 'genesis_after_content', 'child_get_blog_sidebar' );

        }

    }

    /**

     * Retrieve blog sidebar

     */

    function child_get_blog_sidebar() {

        get_sidebar( 'blog' );

    }

     

    I don’t understand why I have to add an action to get the header either. Doesn’t the header come into the custom page template when I use Genesis()

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

You must be logged in to reply to this topic.