Skip to content

Instantly share code, notes, and snippets.

Created September 14, 2012 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/89552c6144975078c93f to your computer and use it in GitHub Desktop.
Save anonymous/89552c6144975078c93f to your computer and use it in GitHub Desktop.
LeeAnn's Custom Functions.php file
register_sidebar(array(
'name' => 'Landing Page Sidebar',
'id' => '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' => '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' => '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' => '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_ ()) {
mysite_do_sidebar('Opt-in');
}
else {
mysite_do_sidebar('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