I'm trying to create a one column child theme for twenty Ten, but I can't figure out how to unregistered the sidebar widget area while leaving the footer ones intact. Any help appreciated, or links to tutorial sites that might be helpful.
Thanks
I'm trying to create a one column child theme for twenty Ten, but I can't figure out how to unregistered the sidebar widget area while leaving the footer ones intact. Any help appreciated, or links to tutorial sites that might be helpful.
Thanks
If you take a look at the onecolumn-page.php file in the twentyten folder, you see that it does not call for the sidebar.
If you want your homepage not to display the sidebar, just remove the get_sidebar line of code, and you'll probably be all set. Otherwise for pages just copy and use the onecolumn-page.php file.
I read it that the whole theme is to have no sidebars not just the pages where you could use the onecolumn-page.php
Only if this is correct then you need to copy all page files over to the child themes folder, archive.php, index.php, page.php, single.php etc:
In each page file find <?php get_sidebar(); ?>
And remark <?php //NOT REQUIRED get_sidebar(); ?>
The twenty ten theme uses the margins for the sidebar space, and the default style margins in the twenty ten themes style.css are:
#container {
float: left;
margin: 0 -240px 0 0;
width: 100%;
}
#content {
margin: 0 280px 0 20px;
}
So in the child themes style.css overide these, values untested so you may need to adjust them:
#container {
margin: 0;
}
#content {
margin: 0 0 0 20px;
}
If that does not work try:
#container {
margin: 0 -20px 0 0;
}
/* 20px each side */
#content {
margin: 0 20px;
}
HTH
David
The two solutions suggested above didn't work. I would like my blog page (called Articles) to match the rest of the website, which doesn't need a sidebar.
@AliceB-Edits
link to your site?
the blog page is probably using index.php - so you need to make the edits there.
This topic has been closed to new replies.