How reduce gaps in template and between sidebar and content?

Discussion in 'ClassiCraft WordPress Theme' started by M5LASTER, Sep 6, 2014.

Thread Status:
Not open for further replies.
  1. Yogesh

    Yogesh Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,052
    Likes Received:
    41
    Hello,

    To make new sidebar which will be different from default sidebar use class="sidebar-1" in place of class="sidebar" in following code.
    <div class="sidebar">
    <?php
    if ( is_active_sidebar( 'custom-sidebar2-widget-area' ) ) :
    dynamic_sidebar( 'custom-sidebar2-widget-area' );
    endif;
    ?>
    </div>

    To make different sidebar don't use same class of default sidebar and apply new CSS in new sidebar as your requirement.

    Thanks & Regards
    Yogesh Bhade
     
  2. M5LASTER

    M5LASTER Member

    Joined:
    Oct 21, 2013
    Messages:
    232
    Likes Received:
    0
    Hi Yogesh,

    This last update is the key solution.

    The below class="sidebar2" is what should have solved this issue from the start of the thread. There is no need to create new sidebars as long as you can use the same sidebar but have it css controlled differently from the calling template or file.

    <div class="sidebar2">
    <?php
    if ( is_active_sidebar( 'custom-sidebar2-widget-area' ) ) :
    dynamic_sidebar( 'custom-sidebar2-widget-area' );
    endif;
    ?>
    </div>

    Thanks,
    Mike
     
  3. Yogesh

    Yogesh Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,052
    Likes Received:
    41
    Hello Mike,

    Hope your issue has been resolved.

    Thanks & Regards
    Yogesh Bhade
     
  4. M5LASTER

    M5LASTER Member

    Joined:
    Oct 21, 2013
    Messages:
    232
    Likes Received:
    0
    Hi Yogesh,

    Yes, it is resolved. This line resolved it.

    <div class="sidebar2">

    Thanks,
    Mike
     
Thread Status:
Not open for further replies.

Share This Page