Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #370826

    I am setting up Sensei Template with enfold.

    I am having trouble showing one of my “sidebar widgets” that I created.

    Here is what is looks like, but not taking ?

    The sidebar custom widget is called “Webinar Sidebar”

    `//get the sidebar
    $avia_config[‘currently_viewing’] = ‘page’;
    get_sidebar(‘webinar_sidebar’);`

    #370912

    Hey eberswine!

    Thank you for using Enfold.

    Did you create a sidebar file called sidebar-webinar_sidebar.php? Please refer to this link: http://codex.wordpress.org/Function_Reference/get_sidebar

    Regards,
    Ismael

    #371627

    Hi Ismael,

    Looking at the sidebar.php page, it looks like I can just add a “conditional statement” ??

    No ?

     if(empty($avia_config['currently_viewing'])) $avia_config['currently_viewing'] = 'page';
    
                // general shop sidebars
                if ($avia_config['currently_viewing'] == 'shop' && dynamic_sidebar('Shop Overview Page') ) : $default_sidebar = false; endif;
    
                // single shop sidebars
                if ($avia_config['currently_viewing'] == 'shop_single') $default_sidebar = false;
                if ($avia_config['currently_viewing'] == 'shop_single' && dynamic_sidebar('Single Product Pages') ) : $default_sidebar = false; endif;
    
                // general blog sidebars
                if ($avia_config['currently_viewing'] == 'blog' && dynamic_sidebar('Sidebar Blog') ) : $default_sidebar = false; endif;
    
                // general pages sidebars
                if ($avia_config['currently_viewing'] == 'page' && dynamic_sidebar('Sidebar Pages') ) : $default_sidebar = false; endif;
    
                // forum pages sidebars
                if ($avia_config['currently_viewing'] == 'forum' && dynamic_sidebar('Forum') ) : $default_sidebar = false; endif;
    
            }
    #372172

    Maybe I will try the other sidebar route ?

    #372474

    Hey!

    It is possible but you have to find the sensei page template. Add something like:

    $avia_config['currently_viewing'] = 'sensei';
    

    On sidebar.php, look for this code:

    // forum pages sidebars
                if ($avia_config['currently_viewing'] == 'forum' && dynamic_sidebar('Forum') ) : $default_sidebar = false; endif;
    

    Below, add something like this:

    // sensei pages sidebars
                if ($avia_config['currently_viewing'] == 'sensei' && dynamic_sidebar('Sensei') ) : $default_sidebar = false; endif;
    

    Go to Appearance > Widgets, create a custom widget called Sensei.

    Cheers!
    Ismael

    #373999

    Perfect! Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Trying to echo custom sidebar wiget in child template?’ is closed to new replies.