WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Remove sidebars from some pages (23 posts)

  1. worthwhileluxury
    Member
    Posted 4 years ago #

    Hi there,
    I've looked through so many help pages now but I don't get anything that helps me.
    I want to remove the side bars from some of the pages in my blog. The landing page to be as is but I want to remove the right bar in some pages and have the body expand to the right edge of the blog section.
    Can someone look at my blog http://www.worthwhileluxury.co.za and tell me how I can remove the right hand column on the About Me page and then extend the text of the body to the edge. This will help me figure out what to do with the other pages.
    Thanks

  2. Shane G.
    Member
    Posted 4 years ago #

    Hi,

    Check with this article:

    http://codex.wordpress.org/Customizing_Your_Sidebar

    Thanks,

    Shane G.

  3. skylar_inmotion
    Member
    Posted 4 years ago #

    In your page.php file you can remove the calling of the sidebar for pages. Since you're using an Artisteer-created theme, it will probably look something like:

    <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>

    You'd also need to re-size the middle area to compensate:
    <div class="art-content"> CHANGES TO
    <div class="art-content" style="width:585;">

  4. worthwhileluxury
    Member
    Posted 4 years ago #

    Gee thanks skylar! I am new and it can be a real struggle. But I am learning FAST! Will give it a bash.

  5. worthwhileluxury
    Member
    Posted 4 years ago #

    This works fantastically skylar. Just a quick one. This removes the sidebar from all the pages except the home page. if I want it back to say the contact us page ... is that possible? Or no can do?

  6. worthwhileluxury
    Member
    Posted 4 years ago #

    Oh Skylar, the width adjustment doesn't work :-(
    Perhaps I need to do something in the css?

  7. skylar_inmotion
    Member
    Posted 4 years ago #

    Oops, I forgot the px at the end... :-P Try:

    <div class="art-content" style="width:585px;">

    Yes, it will remove the sidebar from all the pages. If you want it back for just the contact page, create a copy of page.php and rename it page-25.php (since the contact page URL is http://www.worthwhileluxury.co.za/?page_id=25 ), note the "25" at the end matches. In page-25.php, you can add the sidebar back to the code and it will only be used for the corresponding page with the URL ending in "25" http://www.worthwhileluxury.co.za/?page_id=25.

  8. worthwhileluxury
    Member
    Posted 4 years ago #

    Oh goodness you have been such a great help! THANK YOU! It works!!!

  9. worthwhileluxury
    Member
    Posted 4 years ago #

    Skylar. Thank you for all your help. I am now busy with another site and have managed to take out one of the sidebars. You say I must copy the page.php and make another. I did this using filezilla and then put the page-33.php into the wordpress admin.
    How do I edit this page as it doesnt' appear in the edit section of my appearance box in wordpress.
    on the first two tabs I want sidebar 1 to appear. From My Business onwards I want sidebar 2 to appear. How do I do it so that the correct sidebar appears on all the sub-pages too.
    Am I asking too much? I have tried the training pages but I have tried what they say but it doesn't work. If I add any PHP files they don't appeaer on the Apparance section so I can't edit them.
    Can you help?

  10. skylar_inmotion
    Member
    Posted 4 years ago #

    It should pop up in the appearance editor once you've added it to the theme folder, you should be putting it in wp-content/themes/yourthemename/page-##.php. A log out/in might help.

    You could make your original page.php the two sidebar version (which would be the default for every page) and then you could make the custom page-##.php pages for just the first two tabs to override it.

  11. digitalparadisetv
    Member
    Posted 3 years ago #

    I'm close I can feel it!

    I got rid of my side bar, but can seem to expand my content.
    <div class="art-content" style="width:585px;"> (is this already in the code or do I have to add this line?

    I use artisteer too.

    The only thing I see that is close to what you describe is
    <div class="art-contentLayout">
    <div class="art-content">

    My troubled page

  12. seraph4633
    Member
    Posted 3 years ago #

    Thank you all, this will definitley help me. I'm totally new to WP.

    [sig moderated as per the Forum Rules]

  13. intenseblog
    Member
    Posted 3 years ago #

    I think you should create a custom design for page that you do not want to embbed the sidebar in it.
    [sig moderated as per the Forum Rules]

  14. misterpatrick67
    Member
    Posted 3 years ago #

    You could also do a conditional call for specific pages. For example:

    <?php wp_reset_query(); ?>
    	<?php if (is_home()) {
    				$post_id = 30;
    				$queried_post = get_post($post_id);
    				?>	
    
    				<h2><?php echo $queried_post->post_title; ?></h2>
    				<p><?php echo $queried_post->post_content; ?></p>
    
    	<?php } elseif (is_page('140')) {
    				 $post_id = 80;
    				 $queried_post = get_post($post_id);
    				 ?>
    				 <h2><?php echo $queried_post->post_title; ?></h2>	 
    
    	<?php	 } else { ?>
    			//empty page
    				?>		
    
    			<?php } ?>

    This shows custom posts on specifc pages including the homepage but leaves every other page with a blank sidebar. You could customize this ad nauseum.

  15. petrusfajarsubekti
    Member
    Posted 3 years ago #

    Sometimes i edited the file on the editor.
    It sure will need some skills on PHP and HTML, otherwise maybe you will get stuck.
    But i don't think my blog need removed it's sidebar.
    As you know the sidebar is removed itself whenever the pages is not main page.

  16. thesju
    Member
    Posted 3 years ago #

    new thing for me that two sidebar can be edited.

  17. redd-emedia solutions
    Member
    Posted 3 years ago #

    can i edit the php while the plugin is active it says fatal error
    and its not loading what else can be done please can someone have a look at the site and see what thew problem is

    i get this error.

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)
    Timestamp: Tue, 22 Jun 2010 20:44:15 UTC

    Message: Object required
    Line: 53
    Char: 3
    Code: 0
    URI: http://redd-emedia.co.za/blog/

  18. urbanoid
    Member
    Posted 3 years ago #

    For advanced wordpress 3 themes and tutorials, check out my wordpress 3 theme blog.

  19. michaelvk
    Member
    Posted 3 years ago #

    It should pop up in the appearance editor once you've added it to the theme folder, you should be putting it in wp-content/themes/yourthemename/page-##.php. A log out/in might help.

    thanks,
    michael.

    [Sig moderated]

  20. chikajm
    Member
    Posted 3 years ago #

    Hi everyone,
    I have a blog using the Ligneous theme and I too would really like to know how to get rig of the sidebar and make the content area bigger on just some of my pages. This is my site chikamokwe.com

    skylar_inmotion you said to go into the Page.php and edit some of the CSS there.
    I went into my page template.php (is this theequivalent?) but the code you specified didn't seem to fit anywhere.

    Can anyone help please?

    Many thanks!

  21. myelectricaljobs
    Member
    Posted 3 years ago #

    Some great information here as newbies we are still learning..

  22. secci
    Member
    Posted 3 years ago #

    @chikajm change the CSS id #content width to say 880px and at the bottom of the template file there should be something along the lines of get_sidebar();? just remove that and should have a sweet design.

  23. mrmist
    Forum Janitor
    Posted 3 years ago #

    Closing this thread due to the massive amount of spam being posted on it. I've had to edit practically every post.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags