I need to turn off the sidebars for my pages but leave both on for my posts. Could someone smarter than me help me do this please?
I need to turn off the sidebars for my pages but leave both on for my posts. Could someone smarter than me help me do this please?
create a Page template(s) and leave off the call for a sidebar
use created Page template for pages
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
Thanks, I followed the instructions on the wordpress page but it didn't work. I hate to have a site with no sidebars but I may have to. PHP is just not my cup of tea.
thousands have used those instructions without problems
what do you mean "it didn't work"?
It goes to a syntax error instead of the page. I removed the code and it goes to the page.
are you creating a completely new template in this format?
<?php
/*
Template Name: Snarfer
*/
?>
Then uploading it to your theme files?
No, I just added that code to the existing page template so it would hopefully lose the sidebars on all pages, but not posts.
won't work
you need to create a new template with above format
"snarfer" is whatever you want to name the template
you can use page.php for examples of how to call the footer and header
Oh, I don't know how to do all that. Sure wish you could do this from the dashboard settings.
not possible
do this - copy this info into notepad
<?php
/*
Template Name: new-page
*/
get_header(); ?>
<?php get_footer(); ?>
save it as new-page.php
upload it to your current theme files
go to your wordpress admin - Page - new page
make a test page and from drop down box on right, choose new-page template
save page
view page
how much else do you want to add to it?
I did that and got the new page up but it still has the sidebars. I just went ahead and turned the sidebars off for the whole site.
Perhaps your sidebars are being called within header.php?
I looked on header.php and didn't see where it said sidebars anywhere. I don't know.
man how did it pull sidebar when it's not called in the template?
good luck
edit - found this plugin but can't vouch for it
http://www.bin-co.com/tools/wordpress/plugins/article_templates/
Thanks anyway for your help. I'll just have to settle for a sidebarless limited navigational site I guess, with emphasis on the back button.
I know this thread is a year old--but it's still showing up prominently in discussions for the Starscape theme--and has some noteworthy information! Just thought I would mention this unworthy quick-and-dirty method to remove sidebars or anything else on any specific page or post. (Not recommended if you can do the other methods, but it works.) As you probably know, display:none is typically used to remove side menus in a printer-friendly print.css style sheet which every webpage "should" reference (but many do not). "Edit" every page, click the HTML tab and add this at the top. If "#sidebars" removes too much, view-source for more precise #id or .class. If you want anything else to disappear, other comma-separated .classes and #id's may also be added, of course.
<head><style>div#sidebars {display:none}</style></head>
This topic has been closed to new replies.