Close
WordPress Remove Sidebar for a Page.

WordPress sidebar() – disable for a page

If you do not know how to achieve this then stay put.

I quickly figured this out in a dirt and cheap way.
But I need a solutions that takes less than 10 min and this one surely do.

Okay so to remove the WordPress Sidebar for a specific page you do the following:

  • Go to All Pages
  • Hover over the “Edit” link – you will see in your browser where this link points to. Find the “post” parameter. This is your post/page id.
  • Now open the page.php page
  • Find the code that look like this:

<?php get_sidebar(); ?>

and replace with this:
(btw remember the post id you got from the link parameters? Replace ‘xxx’ with post id)

<?php if (! is_page(‘xxx’) ) { ?>
<?php get_sidebar(); ?>
<?php } ?>

 

Teach me some WordPress tooo please 🙂

Share the joy
  •  
  •  
  •  
  •  
  •  

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2026 Tubbergh.com | WordPress Theme: Annina Free by CrestaProject.
css.php