Problems With Widget Placement in Footer
-
I was adding a widget ready footer to my Theme. I found several tutorials but none of them worked, so I did a mix of them (I don’t know anything about PHP, CSS etc!)
Somehow, I made the footer Widget Ready, but the problem is that, when I add more than 1 Widget to any footer column, the Widget overflows (I mean moves to) next column and next column’s content moves to column next to it and so on…. To see example, see my home page, Here The series widget has been added after the Recent Comments widget. But it moves to below column 1 (The one having Meta Content). In Widget page of admin panel, Series widget displays below Recent Comments)
Here are changes and additions to the Files:
Added following Code to Sidebar.php
#subfooter { width:95%; overflow: hidden; margin-left:auto; margin-right:auto; height:300px; background-color:#f3f1e0; border: 1px solid #D9D6BC; clear:both; } #subfooter .widget { width:24%; float:left; display:block; } #subfooter .widget .inner { padding:5px; } #subfooter ul { list-style-type: none; margin: 0; padding: 0; } #subfooter ul li { list-style-type: circle; margin: 0px 0px 2px 25px; padding: 1px 0px 0px 0px; } #subfooter ul li a, #sidebar ul li a:visited { font-size: 14px; } #subfooter .alignright { float: right; margin-left: 10px; } .aligncenter { margin-right: auto; margin-left: auto; } .alignleft { float: left; margin-right: 10px; }
Added to Functions.php
if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'Footer Left','before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',)); if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'Footer Center','before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',)); if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'Footer Right','before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',)); if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'Footer Extreme Right','before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h2>','after_title' => '</h2>',));
Added to Footer.php
<div id="subfooter"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Footer Left') ) : else : ?> <?php endif; ?> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Footer Center') ) : else : ?> <?php endif; ?> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Footer Right') ) : else : ?> <?php endif; ?> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Footer Extreme Right') ) : else : ?> <?php endif; ?>
No more changes to any files! I am using Wp Them.es Blue Theme.
Can you help me with this problem? Better if you spoon-feed me changes/additions, I do not php and css, everything I did with if etc. was from web tutorials and copy pasting from other themes.
- The topic ‘Problems With Widget Placement in Footer’ is closed to new replies.