Search code examples
wordpresssidebar

Styling for WordPress sidebar not looking right - dynamic_sidebar()


Custom sidebars has been a breeze so far except with it comes unto the blog 'Category'.

Notice how it looks perfectly here on the 'Page' version - http://70.87.35.71/~life/?page_id=87

but the same sidebar has different elements the category version - http://70.87.35.71/~life/?cat=1

Why does the sidebar look so crappy when under the category section and how do I make it look like the 'Page' version.

My sidebar code is below

<div id="sidebar" class="clearfix">



<?php 

if ( !in_category('1') ) {
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar') )
    {}

}
else {
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Blog') )
    {}

}
?> 
</div> <!-- end sidebar -->

Solution

  • Try changing it to:

    <?php     
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Blog') )
        {}
    ?>
    

    remove the if else statement.