Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

Removing sidebars from specific pages?

Status
Not open for further replies.
Joined
Sep 18, 2010
Posts
294
Reaction score
2
Hey, was just wondering if anyone knows how to remove sidebars from a specific page (but leaves them on the rest of the site).
Example: have been playing with a bit of wordpress recently and have set up clubcard/info to learn. Now I've sorted the sidebars on the pages but don't want them to show up on the page that the search results show up on in order to comply with the custom search engine 795 px minimum. Basically need to remove sidebars to be able to use the whole page.
Any help/ info would be much appreciated!
 
Depending on the theme you can disable sidebars in the page attributes tab check out the template dropdown to view your options.
 
Hey fish, thanks for the reply, unfortunately theme doesn't have that option and I've tried editing the page.php file but can't get the results I'm after... it's driving me insane!:)
 
hey newpbc,

thanks for the help, theme is a custom one, made when i was a little less experienced... basically, i'm just trying to show the search results on a static page (www.clubcard.info/search-results) and want to remove sidebars and use the entire page area to display results from the custom search engine, i'm not sure about setting up a template to display the search results and don't have the option to choose a template when writing a page anyway?
I've sort of gathered that i'm going to have to figure out some php to remove sidebars from just a single page and then list the ones i want them shown on?
might just remake the entire theme at this rate...
any thoughts?
cheers!
 
Does your theme have a file called search.php

If not try this make a copy of your index.php rename it search.php

Open search.php Then remove reference to sidebar 1 and sidebar 2
 
That should have been !is_page but I can't seem to edit the post on my iPhone.
 
Peter,

Thanks for the reply, i did try this earlier but can't get the text/ content to take over the whole of the page, i'll prob have to play with the css? Have left this mod live if you want to se what i mean:) thanks again for the help!!

cheers!
 
thanks guys for the help, have gone and made another theme, needed an update anyways, too many tweaks here and there made life way too complicated! got to look into conditionals more, some great applications:)
thanks again,
cheers
 
Welcome to programmer world, we'd rather walk a 500 miles over broken glass to 'make something work', rather than a leisurely 500 mile country drive to start from scratch ;)
 
Welcome to programmer world, we'd rather walk a 500 miles over broken glass to 'make something work', rather than a leisurely 500 mile country drive to start from scratch ;)

I am much the opposite, I find it so much easier and quicker to make from scratch rather than trying to figure out how to make wp do it :(
 
Wordpress gives me a constant headache.

When it comes to mini-sites I like to build them in php.

Doesn't stop me wasting half my day adapting includes and classes when I should really just start from scratch. Once you've put time in, it seems a waste to bin it, so you keep on slugging ;)

I am much the opposite, I find it so much easier and quicker to make from scratch rather than trying to figure out how to make wp do it :(
 
couldn't you have just changes the CSS to suit the given page?

Wordpress assigns each page with it's own class assigned to the <body> tag, giving you the ability to do this in the CSS:

Code:
body.search .sidebar {display:none;}
This is theme specific, though. Not all themes, especially custom ones, will do this.

A solution would have been to add an extra line of CSS inside the <head> on the specific page.

<?php if(is_page('search-results) { ?>
#maincontent { width:1000px; }
<?php } ?>
 
Hey everyone,

Thanks for the continued help!
@ skinner: yep, programming is not my thing so once i'd put it all together and got it working i figured it'd be a waste to chuck it and start again:)
@ seemly: suppose i could have tried but like i said, the constant tweaking without a changelog started to make everything 'fuzzy':)
@ golddiggerguy: cheers for the link, will look into it.
I feel i'm being dragged deeper into php although this wasn't my intention!
thanks again guys!
 
Update:)
Have sorted the theme to work properly with updated wp install! Search results covering the whole page!:lol:
 
Status
Not open for further replies.

Rule #1: Be Respectful

Do not insult any other member. Be polite and do business. Thank you!

Members online

Premium Members

Latest Comments

Upcoming events

New Threads

Domain Forum Friends

Lastest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom