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 9020381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:00:06+00:00 2026-06-16T05:00:06+00:00

i m working on wordpress with bootstrap theme.i m using a Main left-sidebar on

  • 0

i m working on wordpress with bootstrap theme.i m using a Main left-sidebar on my site.as i put the code into WIDGETS> MainSidebar but now i have a problem that on clicking a link i want to open another page having same as my home page but different sidebar.how can i achieve it??

Here is my Template for bootstrap:Page Template (page.php)

<?php
/** page.php
 *
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @author      Konstantin Obenland
 * @package     The Bootstrap
 * @since       1.0.0 - 07.02.2012
 */

get_header(); ?>

<div id="primary" class="span9">
    <?php tha_content_before(); ?>
    <div id="content" role="main">
        <?php tha_content_top();

        the_post();
        get_template_part( '/partials/content', 'page' );
        comments_template();

        tha_content_bottom(); ?>
    </div><!-- #content -->
    <?php tha_content_after(); ?>
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();


/* End of file page.php */
/* Location: ./wp-content/themes/the-bootstrap/page.php */
  • 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-06-16T05:00:09+00:00Added an answer on June 16, 2026 at 5:00 am

    You must have two different sidebars.
    Put sidebar code in a custom template name them you like.

    see how to Create custom template link

    and use wordpress conditional tags like.

    if(is_page( 2 )){ // 2 is page id
    get_template_part( 'custom', 'sidebar' ); //  (custom-sidebar.php)
    }
    else{ 
    get_sidebar();
    }
    

    conditionnal tags

    By this way you can have 2 sidebars on different pages.

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

Sidebar

Related Questions

i m working in wordpress with bootstrap theme and using the accordion menu from
I am working on a WordPress site and I have placed the following code
Longtime reader of stackoverflow but first question. I'm working with Wordpress (specifically thesis theme)
Working with Wordpress on this. I'm using Magpie to grab an RSS feed, but
i m working with wordpress in bootstrap theme. my problem is that i opened
I am working on a WordPress theme using the WordPress Boilerplate as a base
I want to use this code on my WordPress blog, but it's not working:
I am working on a WordPress site where one of the pages lists excerpts
I'm working on a wordpress site, with a blog post that ends like: http://www.blog.com/?p=2
note: I'm working on wordpress but this isn't a wordpress question. I have a

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.