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 */
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.
conditionnal tags
By this way you can have 2 sidebars on different pages.