Hi there,
I would like to change the sidebars on my blog, http://hazyesque.com , to include a sidebar that spans the two sidebars that are there at the moment. I know that I need to edit the functions file and probably CSS but no idea what to do. The theme I am using is called Zen Garden, available at http://www.jusanya.com/zen.
Help much appreciated!
Hazel
Baki Goxhaj answers:
Do you want to use one sidebar in stead of two?
If so, you have got to edit several files where both sidebars are included and keep only one of them. Than to make it use all the remaining space, just use CSS.
Hazel comments:
I want an extra sidebar spanning the sidebar area , plus the two sidebars.
Does that make more sense?
Baki Goxhaj comments:
So you need a third sidebar, right?
Go to sidebar.php and add this code:
<strong>
<div class="full-side">
<h3>Add data here</h3>
</div><!-- .full-side --></strong>
<?php if ( is_active_sidebar(1) ) : ?>
<div id="left">
<?php if ( !dynamic_sidebar(1) ) : ?>
<?php endif; ?>
</div><!--// left -->
<?php endif; ?>
<?php if ( is_active_sidebar(2) ) : ?>
<div id="right">
<?php if ( !dynamic_sidebar(2) ) : ?>
<?php endif; ?>
</div><!--// right -->
<?php endif; ?>
The code in bold is what I wrote. Then add style to your style.css to make it look nice.
Hazel comments:
I appreciate that that would be a simple way to do it, but I want to use actual widgets that I don.t know what code they create or it's dynamic code.
If I have priced the answer to this question too low in order to get this help then I would appreciate it if someone would let me know.
Baki Goxhaj comments:
Code for new main widget:
functions.php
register_sidebar(array(5,
'name' => __('Main Sidebar') . ' 5',
'before_widget' => '<div id="%1$s" class="widget %2$s sidecolumn">',
'after_widget' =>'</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
sidebar.php
<?php if ( is_active_sidebar(5) ) : ?>
<div class="full-side">
<?php if ( !dynamic_sidebar(5) ) : ?>
<?php endif; ?>
</div><!-- .full-side -->
<?php endif; ?>
Hazel comments:
Would it be pushing it if you could help me with the css?
Baki Goxhaj comments:
No, but it would cost a bit more. :)
Hazel comments:
Fine. I'll ask another question. Thank you for your help.
Erez S answers:
Add this to your style.css:
#right{display:none;}
#main{width:700px;}
#left{width:200px;}