Need help on Wordpress sidebar. My site has one sidebar, is it possible to add another sidebar the function or work differently? I only want to display 1 sidebar. I want to use a different sidebar for my search result page. Is it also possible to make my sidebar display additional pics or ads when the page or post is too long to avoid seeing blanks space on my sidebar.
Hi, to register a new sidebar, go to your functions.php file in your theme folder and put in: if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'SIDEBARNAME', 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => '', )); Code (markup): Replace SIDEBARNAME with whatever you want to call it Then wherever you want to display the sidebar: <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('SIDEBARNAME') ) : ?> <p>This is what shows when no widgets are added.</p> <?php endif; ?> Code (markup): Hope it helps
I already added sidebar2.php <div id="sidebar2"> PHP: but it's not working. Do I still need to add it on stylesheet?