I'm currently making my first custom theme from scratch, and I'm having difficulty with the sidebar. I want the categories widget to behave the same way it would in the Twenty Eleven, but on a page other than the homepage. When a user clicks a category it shows only posts that are in that category.
With my current theme if a user clicks a category link it redirects the user back to the homepage. I'm not sure how to go about fixing this.
In my functions.php file I have...
<?php if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'sidebar', 'before_widget' => '<div class="sidebar-box">', 'after_widget' => '</div>', 'before_title' => '<span class="sidebar-title">', 'after_title' => '</span><div class="dots"></div>', )); ?>
In the template file for the page I want the sidebar on I have...
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("sidebar") ) : ?> <?php endif; ?>
Also, I do not have any of this online at the moment, so I don't have a site to link to. I'm using MAMP to work on this locally.
Thanks in advance,