Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

How to Remove Sidebar from specific Post


  #1  
Old Nov 16, 2010, 06:19 PM
vintario
 
17 posts · Oct 2010
Hi,

I would like to remove right sidebar from only one post. The theme lets you to exclude sidebar on specific pages but not posts.

Should I add some code like that into footer.php?

PHP Code:
<?php
if (is_single(XX)) {
}
else {
get_sidebar();
}
 
?>
That's all that I could think of with my almost non-existent knowledge in all this.. That's all that I learned by messing with different theme files today, atleast I was able to turn off tags under the title for specific posts and categorys, so I thought getting rid of sidebar is similar.

If it's easier then maybe the sidebar could be disabled on all posts in that one category. I disabled the sidebar in that category, but it works only for the category page itself not the posts inside.

Also when sidebar disabled the post should occupy not only the center column but also sidebar (990px). When I disabled the sidebar in category, it did it automatically, but i think only because it was done through Ata theme option. If messing with the code I will probably have to define the width of the center column manually.

Lastly, center column seems to have a padding at the top by default, I'm fine with it, but I would like not to have it for some specific posts, where should I modify the code this time?



Thank you in advance,
A.L.
  #2  
Old Nov 17, 2010, 05:05 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what version of Atahualpa and wp?

Do you mean you don't want the sidebar to show up when that post is on the blog page or when you go to the 'post' page for that post?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Nov 17, 2010, 05:13 AM
vintario
 
17 posts · Oct 2010
Hi,

I'm using Ata 3.5.3 and WP 3.0.1.

I don't want to have a sidebar (Right Sidebar) when reading that post(Single Post page). So for example the post ID is 581, so when opening post ID 581 it will be showing at full width (not full as the whole screen but [center column+sidebar] width).

I just hope that I didn't miss anything in Ata options but if I'm right then there you can only disable sidebar on specific Page or Category pages (or on ALL single Post pages, but I want only on one (later maybe on some more)).
http://zfieldz.com

Best regards,
A.L.

Last edited by vintario; Nov 17, 2010 at 05:30 AM.
  #4  
Old Nov 17, 2010, 05:39 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
there are two ways to do this. If you just want it not to display, you can add
HTML Code:
body.postid-581 #right {display:none;}
to the CSS Inserts. This will make the sidebar not display, but the area it would display will be empty.

If you want to reclaim the space, then you need to edit the code header.php to test for the page and set the sidebar off and adjust the number of columns. Doing it this way means you will also have to redo this change each time you update the theme.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Nov 17, 2010, 05:47 AM
vintario
 
17 posts · Oct 2010
I want the second option, but could you please give some more details on how to do it because i'm a beginner at this.

Also, sure that i need to edit the header.php? I know that I'm not the expert here but I saw a thread yesterday where Flynn said:
"The left sidebar(s) are in header.php, the right sidebar(s) are in footer.php

header.php: <head>..</head> section and left sidebars
index.php: center column
footer.php: right sidebars and footer"

Since I want to remove Right sidebar, shouldn't it be in footer.php then?

Best regards,
A.L.
  #6  
Old Nov 17, 2010, 06:01 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you will need to edit header.php and find the line
HTML Code:
</head>
and add the following just befor it
HTML Code:
<?php if (is_single('1373') ) {
	$right_col = "off";
	$cols = $cols - 1;
	} ?>
you need to change 1373 to the id of the post you want.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Nov 17, 2010, 06:37 AM
vintario
 
17 posts · Oct 2010
Thank you so much! Been looking for it for a long time. I really think I should start putting some money aside for a donation, because this theme is the best!

Don't want to disturb you more, but maybe you could please get a look at this topic http://forum.bytesforall.com/showthread.php?t=10741. It's been there for some time and I still haven't figured out how to do it. Basicly I want to replace category menu with my own styled one.
Actually I just thought that, it's not replacing, it's more of a "removing category menu" and "adding picture that looks like menubar" :D biggest problem for me right now is that it has 4 states (normal state, roll-over, clicking, and being on that page), and even though I have html and css for this "picture" I don't know how to get it up there.
Well everything else is in that other thread if you have time.


Thanks for all the help!
Best regards,
A.L
  #8  
Old Jun 24, 2012, 05:10 PM
aehageman
 
18 posts · Oct 2011
Quote:
Originally Posted by juggledad
you will need to edit header.php and find the line
HTML Code:
</head>
and add the following just befor it
HTML Code:
<?php if (is_single('1373') ) {
	$right_col = "off";
	$cols = $cols - 1;
	} ?>
you need to change 1373 to the id of the post you want.
Hey juggledad,

I am attempting the same as above with Version 3.6.7 and WordPress 3.4.
The code you provided does reclaim the space, however the side bar is stuffed over to the right and the text in the sidebar is squished.
This post is old, I will continue to read and see if there is an updated post.

Thanks
  #9  
Old Oct 1, 2012, 04:35 PM
rickpoet
 
80 posts · Jan 2010
Hi,

Same issue here...trying to eliminate sidebar from a specific post...inserted the code successfully but now the sidebar is still there to the right of where it normally would be and scrunched very thin...any update to this code to remove it completely?

See here: http://www.hyimvibe.com/hyim/2005/11...imsmusicgoing/

the News column on the right is the sidebar that should be eliminated.

Thanks,

Rick
  #10  
Old Oct 1, 2012, 05:06 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what version of Atahualpa?
What is teh exact code you put in?
Exactly where did you put it?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #11  
Old Oct 1, 2012, 05:33 PM
rickpoet
 
80 posts · Jan 2010
Hi,

Using Atahualpa 3.7.1 (was the latest version when I did most of the work on this site...would prefer not to update at this point as we're about to launch and there are a few mods I'd have to redo...yeah yeah child themes...I know)

Here's the code I dropped in right before the closing head tag in header.php

<?php if (is_single('356') ) {
$right_col = "off";
$cols = $cols - 1;
} ?>

Thanks,

Rick
  #12  
Old Oct 1, 2012, 06:57 PM
rickpoet
 
80 posts · Jan 2010
P.S. I also tried adding:

body.postid-356 #right {display:none;}

as a CSS insert and have the same results.
  #13  
Old Oct 1, 2012, 07:02 PM
rickpoet
 
80 posts · Jan 2010
OK one more update...I had originally but this insert: body.postid-356 #right {display:none;}

into the bottom of the CSS inserts area...i moved it to the top and it now seems to work properly. (No sidebar on that page...) Using this in conjunction with the code insert in header.php to reclaim the space as well.
  #14  
Old Oct 1, 2012, 07:46 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you also need to add that code footer.php right after the line
HTML Code:
<!-- / Main Column -->
then you won't need the css.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #15  
Old Oct 1, 2012, 11:59 PM
rickpoet
 
80 posts · Jan 2010
Since I already have it working is there any reason to eliminate the CSS insert and put that code in the footer.php file?
  #16  
Old Oct 2, 2012, 05:24 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
The sidebar is still there when you hide it with the CSS while it will be gone with the code change, but the page view looks the same so it's your choice.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #17  
Old Oct 2, 2012, 12:18 PM
rickpoet
 
80 posts · Jan 2010
k...I guess I'll leave it since it looks the way I want.

Thanks!

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] post-specific header image w/ css insert (page-specific ones work, but not o viewdesigninc Header configuration & styling 10 Oct 1, 2012 04:43 PM
How to remove kicker from specific pages Fredr Center area post/pages 1 Jun 16, 2010 06:49 AM
Disabling sidebar for specific post-page vi8084 Sidebars & Widgets 3 Mar 10, 2010 05:36 PM
Help: how i can remove some widgets(?) from specific posts maurixx Center area post/pages 1 Jan 28, 2010 07:25 PM
[SOLVED] How do i remove everything but the Recent post and Meta in the right sidebar Siberiantiger Sidebars & Widgets 2 Dec 9, 2009 01:59 AM


All times are GMT -6. The time now is 02:06 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.