Skip to:
Content
Pages
Categories
Search
Top
Bottom

change forum sidebar

  • @rsix08

    Participant

    how can I change the sidebar for the forum page?
    bbPress WP Tweaks « WordPress Plugins did not work for me.

    I was able to remove the blog sidebar and even make the forum full width but what I’d really like to do is add a custom sidebar.

Viewing 6 replies - 26 through 31 (of 31 total)
  • @robin-w

    Moderator

    @martinperreault – hey thanks for that – it’s good to know that advice works, and always nice to be appreciated 🙂

    @mhairilongmuir

    Participant

    I am having the same problem – I have followed the instructions in the codex, and added WP Tweaks, but my custom sidebar for the forum page is not showing. When I go in and edit bbpress.php manually via the editor, the changes show in the sidebar. But when I try to do it via the widgetized area, the bbpress sidebar doesn’t show.

    I also tried Robin W’s fix – moving the widgets out of the area and switching off the plugin etc, but that also didn’t work.

    I am using a child theme of Canvas, and have also implemented the ‘Fix for BBPress and Canvas (5.2 and higher)’ Fix for BBPress and Canvas (5.2 and higher) –

    @robin-w

    Moderator

    the try widget logic

    Download “widget logic”

    https://wordpress.org/plugins/widget-logic/

    This plugin lets you specify conditions for when widget items are displayed.

    You would then put all the widgets for both the blog page and the forum page in one sidebar

    Against each of these you then specify whether you want it to appear on the forum page, on any page with a sidebar that is not the forum (eg your blog), or on both forum and other sidebar pages.

    you do this by putting the following code in the widget logic box that you will see appears against each widget

    For a forum sidebar you put : is_bbpress() ie is this page a forum page
    For any other sidebar you put : !is_bbpress() ie is this page NOT a forum page
    For any item to appear on both, simply leave the logic blank.

    Give that a try and come back and let us know how it works

    @mhairilongmuir

    Participant

    Thanks so much, that’s it working perfectly now 🙂

    @robin-w

    Moderator

    great – glad you’re fixed !

    @amandainjames

    Participant

    I think you want to add a custom widget in your theme. You can add custom widget adding this code in functions.php

    function wpblog_widget()
    {
        register_sidebar(array(
            'name' => __('Primary Sidebar', 'wpb'),
            'id' => 'primary_sidebar', // unique-sidebar-id
            'description' => '',
            'class' => '',
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
        ));
    
    }
    
    add_action('widgets_init', 'wpblog_widget');

    Reference: WordPress Custom Widgets

Viewing 6 replies - 26 through 31 (of 31 total)
  • You must be logged in to reply to this topic.
Skip to toolbar