Support » Theme: DevDmBootstrap3 » Show Left sidebar on one page template only

  • Resolved borzoid


    I want just a right sidebar on most of the pages but both left and right on one particular page template.

    Is it possible to toggle the left sidebar on only for that template? If so how would I indicate that. I know I can is_page_template which works to a point but the content area width does not change to a one sidebar width.

    Also could you give a brief description of how the .less files work? I know they are for targeting styles but would like to understand how they are getting pulled into the stylesheets.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author DevDm


    Sorry I missed this borzoid. They didn’t notify me that there was a support inquiry!

    1) For now it might be best to wrap these lines in your is_page_template conditional and hard code the col size of your content area.

    <?php if ( is_page_template('mypagetemplate.php') ) { ?>
         <div class="col-md-6 dmbs-main">
    <?php } else { ?>
        <?php //left sidebar ?>
        <?php get_sidebar( 'left' ); ?>
        <div class="col-md-<?php echo main_content_width(); ?> dmbs-main">
    <?php } ?>

    2) The less files are there to assist your workflow. You do not have to use them and they are not getting compiled “on the fly” by the theme. They are there if you choose to use theme.

    I try to explain it better here LESS

    No worries – that’s exactly what I did once I figured out how the col-# was calculated.

    Done some reading on the Less stuff – not using it but maybe in the future. Thanks for the link.

    While I have your ear – have you ever tried to implement equal column heights with jquery? Trying to but it’s not getting the correct children divs.

    Theme Author DevDm


    I’ve done it with something like this
    where you grab the height of a div and set it for another.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show Left sidebar on one page template only’ is closed to new replies.