If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
Hi, I’d like to know how i will change the size of the double sidebar, for example, now they are both 150pixels, I would like to make the left 100px and the right 200px, can you give me some guidance please? i’m really struggling with this,
(this looks like a great forum btw, great job)
There are a couple of changes you need to make to do this:
1.) Open up sidebar.php and find this line:
foreach($k_option['custom']['sidebars'] as $sidebar)
On the line before add this code:
$counter = 1;
2.) Then find this line in sidebar.php (literally a couple down from the last one):
echo "<div class='sidebar ".$sidebarSize."'>";
and change it to this:
echo "<div class='sidebar ".$sidebarSize." sidebar-".$counter."'>"; $counter ++;
3.) You need to add this code to your style.css file:
width: 100px !important;
width: 200px !important;
Step 1 adds a counter to the page outside the foreach code.
Step 2 echo’s (prints) the existing counter value (1 for the first sidebar) and then increases the counter count by 1. Because we use a foreach command to display the sidebars, the next sidebar’s counter value is 2.
Step 3 adds the necessary CSS to change the sidebar width. The !important statement ensures that this size overrides any existing value.
Hope this helps, if you have any further questions let me know.
Fantastic. you made it soooo easy.
thanks for the great support. it works perfectly with your guidance!
I have a few other things that puzzle me but i think i can figure it out, if not i will post here.
The topic ‘Different width in double sidebar’ is closed to new replies.