Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7503987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:24:55+00:00 2026-05-29T21:24:55+00:00

I am using a wordpress theme with two sidebars. I want to disable one

  • 0

I am using a wordpress theme with two sidebars. I want to disable one for them for a specific page but the code I found regarding disabling sidebar by applying check on function:

<?php get_sidebar() ?>

It will disable both of them. How can I disable one of them only. with the other sidebar working.

Please help!!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:24:56+00:00Added an answer on May 29, 2026 at 9:24 pm

    You can simply for example

    <?php if (!is_page('about-me')) get_sidebar(); ?>
    

    This will disable sidebar on about me page. If you put this on page.php (if have any) otherwise put this on index.php. Here ‘about-me’ is page slug but you can also use page id like is_page(5) and as well as page title too. To check multiple page using slug, id and title you can use an array like

    is_page(array(42,'about-me','Contact'));
    

    For more about is_page() function see http://codex.wordpress.org/Function_Reference/is_page

    Or using filter in functions.php, simply put this in functions.php

    function disable_footer_widgets( $sidebars_widgets )
    {
        if (is_single())
        {
            $sidebars_widgets['footer'] = false;
        }   
        return $sidebars_widgets;
    }
    add_filter( 'sidebars_widgets', 'disable_footer_widgets' );
    

    This is just an example, you have to change widget name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using widgets in my wordpress theme and I need to remove the:
I created a site using wordpress. I installed the 'starkers' theme and modified it.
Anyone with experience using jPicker colorpicker in a WordPress Custom Theme options panel. I
What is the best method, if there is one, of using Wordpress as a
Using wordpress, I am pulling in a custom fields from specific posts to fill
I am using a custom post type in my wordpress theme, and I need
I've developed a wordpress theme on my local machine using apache, when I upload
I'm using a WordPress theme that only has about 10 lines of jQuery, yet
I'm using jShowOff in a WordPress theme inside home.php within the <body> . Inside
I am making a wordpress theme, and I want it to be able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.