Change design layout of sidebar problems
-
I am trying to make the sidebar look like the rest of my site by adding images around the title, content of the section, and add a footer to each sidebar item. I have edited sidebar.php to add my code but it is not showing up. Everything looks the same.
Here is the previous code:
<div id="primary" class="widget-area" role="complementary"> <ul class="xoxo"> <?php /* When we call the dynamic_sidebar() function, it'll spit out * the widgets for that widget area. If it instead returns false, * then the sidebar simply doesn't exist, so we'll hard-code in * some default sidebar stuff just in case. */ if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?> <li id="search" class="widget-container widget_search"> <?php get_search_form(); ?> </li> <li id="archives" class="widget-container"> <h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3> <ul> <?php wp_get_archives( 'type=monthly' ); ?> </ul> </li> <li id="meta" class="widget-container"> <h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <?php wp_meta(); ?> </ul> </li> <?php endif; // end primary widget area ?> </ul> </div><!-- #primary .widget-area --> <?php // A second sidebar for widgets, just because. if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?> <div id="secondary" class="widget-area" role="complementary"> <ul class="xoxo"> <?php dynamic_sidebar( 'secondary-widget-area' ); ?> </ul> </div><!-- #secondary .widget-area --> <?php endif; ?>
Here is what I have changed:
<div id="primary" class="widget-area" role="complementary"> <ul class="xoxo"> <?php /* When we call the dynamic_sidebar() function, it'll spit out * the widgets for that widget area. If it instead returns false, * then the sidebar simply doesn't exist, so we'll hard-code in * some default sidebar stuff just in case. */ if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?> <li id="search" class="widget-container widget_search"> <?php get_search_form(); ?> </li> <li id="archives" class="widget-container"> <div class="leftBoxContainer"> <table height="39px" cellpadding="0px" cellspacing="0px" border="0px"> <tr> <td align="center" valign="top" width="224px"> <table height="39px" cellpadding="0px" cellspacing="0px" border="0px"> <tr> <td><img src="wp-content/themes/to/images/SideBar_MiddleTitle_Area_01.png" width="6px" height="39px" alt="" /></td> <td align="center" width="10px" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"></td> <td align="center" valign="middle" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"><h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3></td> <td align="center" width="10px" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"></td> <td><img src="wp-content/themes/to/images/SideBar_MiddleTitle_Area_04.png" width="6px" height="39px" alt="" /></td> </tr> </table> </td> </tr> </table> </div> <div id="leftBoxContent"> <ul> <?php wp_get_archives( 'type=monthly' ); ?> </ul> </div> <div id="leftBoxFooter"></div> </li> <li id="meta" class="widget-container"> <div class="leftBoxContainer"> <table height="39px" cellpadding="0px" cellspacing="0px" border="0px"> <tr> <td align="center" valign="top" width="224px"> <table height="39px" cellpadding="0px" cellspacing="0px" border="0px"> <tr> <td><img src="wp-content/themes/to/images/SideBar_MiddleTitle_Area_01.png" width="6px" height="39px" alt="" /></td> <td align="center" width="10px" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"></td> <td align="center" valign="middle" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"><h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3></h3></td> <td align="center" width="10px" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"></td> <td><img src="wp-content/themes/to/images/SideBar_MiddleTitle_Area_04.png" width="6px" height="39px" alt="" /></td> </tr> </table> </td> </tr> </table> </div> <div id="leftBoxContent"> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <?php wp_meta(); ?> </ul> </div> <div id="leftBoxFooter"></div> </li> <?php endif; // end primary widget area ?> </ul> </div><!-- #primary .widget-area --> <?php // A second sidebar for widgets, just because. if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?> <div id="secondary" class="widget-area" role="complementary"> <ul class="xoxo"> <?php dynamic_sidebar( 'secondary-widget-area' ); ?> </ul> </div><!-- #secondary .widget-area --> <?php endif; ?>
Nothing is happening. From what I have read I am in the right place, and want to edit the original sidebar, not add my own. I have added all images and css for the layout.
Any ideas?
Thanks,
Clint
- The topic ‘Change design layout of sidebar problems’ is closed to new replies.