-
AuthorPosts
-
December 20, 2014 at 12:26 am #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’);`December 20, 2014 at 5:55 am #370912Hey 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,
IsmaelDecember 22, 2014 at 6:19 pm #371627Hi 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; }
December 23, 2014 at 6:12 pm #372172Maybe I will try the other sidebar route ?
December 26, 2014 at 3:20 am #372474Hey!
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!
IsmaelJanuary 2, 2015 at 5:26 am #373999Perfect! Thanks!
-
AuthorPosts
- The topic ‘Trying to echo custom sidebar wiget in child template?’ is closed to new replies.