Skip to:
Content
Pages
Categories
Search
Top
Bottom

Sidebar Width


  • inkrap
    Participant

    @inkrap

    Alright, first off let me explain what I’ve done so far. For my forums, I have created a forum-specific sidebar.

    sidebar-bbpress
    ` div id=”sidebar”>

    ?php
    if (!function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘bbpress’)):
    endif;
    ?>

    `

    And registered the sidebar in my function.php
    ` register_sidebar(array(
    ‘id’ => ‘bbpress’,
    ‘name’ => ‘bbpress’,
    ‘before_widget’ => ‘div class=”widget”>’,
    ‘after_widget’ => ‘/div>’,
    ‘before_title’ => ‘h4>’,
    ‘after_title’ => ‘/h4>’,
    ));
    `
    And I pull it in my forum.php by:
    `?php get_sidebar( ‘bbpress’ ); ?>`

    In my css I’m able to customize the forum’s #main by referencing “#main.forum”, so I can specify widths that will only affect the forum, etc.

    Now for my issue, how the hell do I change sidebar information ONLY in forums? I’ve tried referencing #sidebar.forums, but it doesn’t classify the sidebar as a forum sidebar.

Viewing 3 replies - 1 through 3 (of 3 total)

  • Lynq
    Participant

    @lynq

    .bbPress #sidebar should work.
    In forum pages you get a .bbPress class inside the body tag (check you have it on bbPress pages).

    See if that works, good luck!


    inkrap
    Participant

    @inkrap

    HALLELUJAH! I have no idea why I hadn’t tried .bbpress #sidebar, but that was the magic combination. Thank you so much Lynq


    inkrap
    Participant

    @inkrap

    For some reason, the following code no longer works after 2.3. It worked it RC1, but not in the final version.

    `#sidebar .bbpress {
    width: 250px;
    }`

    I’ve also tried. #sidebar .forum -.-

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.