Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LeeAnn's Custom Functions.php file
register_sidebar(array(
'name' => 'Landing Page Sidebar',
'id' => 'marry-opt-in',
'before_widget' => '<li class="widget %2$s" id="%1$s">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
register_sidebar(array(
'name' => 'Video 1 Page Sidebar',
'id' => 'marry-video-1',
'before_widget' => '<li class="widget %2$s" id="%1$s">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
register_sidebar(array(
'name' => 'Video 2 Page Sidebar',
'id' => 'marry-video-2',
'before_widget' => '<li class="widget %2$s" id="%1$s">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
register_sidebar(array(
'name' => 'Video 3 Page Sidebar',
'id' => 'marry-video-3',
'before_widget' => '<li class="widget %2$s" id="%1$s">',
'after_widget' => '</li>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
function mysite_dynamic_sidebars() {
if(is_home()) {
mysite_do_sidebar('marry-opt-in');
}
else {
mysite_do_sidebar('marry-video-1');
}
}
add_action('thesis_hook_before_sidebar_1', 'mysite_dynamic_sidebars');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.