remove one of the sidebars
-
Hello !
Im putting together my blog again and really ned some help.
Will someone look at my phpfiles and let me know how to remove the right or left sidebar? I only want one.
The template are with just one, but i coded it to be two years ago and now i just one ONE sidebar 🙂
Thank you so much. My wordpress blog is http://www.jdl.no
-
Go to Appearance > Widgets and move everything into your left sidebar. Note whether the sidebar you moved everything into is Sidebar 1 or Sidebar 2.
You now want to remove the empty sidebar from each page in your theme, so go to Appearance > Editor.
Use the HTML tab in the Editor, not the Visual tab, as you will need to see the code itself.
Go to “index.php”, look for this code:
<?php get_sidebar('two'); ?>
This should be the right sidebar, the one which is empty.
Delete only this piece of code from the page.
Update the file with the “Update File” button.
View your site Home Page in another window or tab in your browser to see if the correct sidebar is now gone.If the correct sidebar is removed and the other one with everything in it remains, then return to your Editor and remain on the HTML tab.
Select each .php page at the right, starting from the top (it will appear in the Editor window), look for and remove the above sidebar code in exactly the same way. Then, go on to the next .php page until all your .php pages are done.
The .php files are usually: 404 Template, Archives, Attachment Template, Author Template, Category Template, Main Index Template (index.php), One column, no sidebar Page Template, Page Template, Search Results, Single Post, Tag Template.
You may have all of these or only some of these.Once you have removed the right sidebar from all the .php pages, you need to fill in the empty space where the removed sidebar was.
Remain in the HTML tab and go to Appearance > Editor and select your “style.css” file.
Find “#sidebar_left” and change “width: 165px;” to “width: 315px;”.
The single sidebar will now be as wide as the Sidebar area in your theme.Thank you Dave! I will try this out 😀
The topic ‘remove one of the sidebars’ is closed to new replies.