Support » Themes and Templates » Remove Sidebar and comments from all pages but the homepage
9 years, 4 months ago
Still new to CSS and HTML. I would like to remove the Sidebar and comments section from every page except my homepage. I’m using the FallSeason theme. Any help would be greatly apreciated.
Go to single.php template and look for the sidebar call function, try to remove it, Do a Backup!! 😀
“Go to single.php template and look for the sidebar call function“
<?php get_sidebar(); ?>
If your theme does not provide a single.php (single post) template, you can always add one. Easiest way to do this is to copy your index.php and rename that single.php.
Another (but more programmatic) way to handle the display of your sidebar based on where one is on your blog is through WordPress’ conditional tags:
Thank you both. That points me in the right direction.
You should basically remove <?php get_sidebar(); ?> from every page except for index.php (archives.php, tags.php, category.php, single.php, 404.php, page.php, search.php).
For navigational purposes, make sure that you leave some sort of link back to the homepage. Most themes have these in the header.php file, so be sure to leave something there!
I’m currently building my site, and I’ve taken the sidebar out of everything! Look here. 🙂