Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress Specific Sidebar – theme salient


  • eefkedigibitch
    Participant

    @eefkedigibitch

    Hi there,

    I’m trying to create a specific sidebar in my website. I’ve been reading about it in this forum and I’m following step 26 of the article ‘Layout and functionality – Examples you can use’.
    What I did so far;
    1. I added the code to register the sidebar in my functions.php of my child theme.
    2. I chose the left-sidebar-page.php of my theme, copied it into my child theme and replaced <?php get_sidebar(); ?> with <?php dynamic_sidebar( ‘bbp-sidebar’); ?>. Because I read this in another topic of a theme salient user.
    Now I have to edit the file like the example that’s mentioned in the article, but I don’t understand it. So this is where I get stuck.

    Can someone please help me?! I’d really appreciate it!

    Kind regards,
    Eve

    Ps. My website has a shop and LearnDash courses. The forum is meanly for the course participants and should be connected to the specific LearnDash courses. The theme I’m working with is Salient. The only other sidebar I have is the woocommerce sidebar.

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

  • Robin W
    Moderator

    @robin-w

    Now I have to edit the file

    ok so you have already put :

    function rkk_widgets_init() {
     
        register_sidebar( array(
            'name' => __( 'bbPress Sidebar', 'rkk' ),
            'id' => 'bbp-sidebar',
            'description' => __( 'A sidebar that only appears on bbPress pages', 'rkk' ),
            'before_widget' => '<aside id="%1$s" class="widget %2$s">',
            'after_widget' => '</aside>',
            'before_title' => '<h3 class="widget-title">',
            'after_title' => '</h3>',
        ) );
        }
     
    add_action( 'widgets_init', 'rkk_widgets_init' );

    into your child theme functions file – yes ?

    and then did this

    I chose the left-sidebar-page.php of my theme, copied it into my child theme and replaced <?php get_sidebar(); ?> with <?php dynamic_sidebar( ‘bbp-sidebar’); ?>. Because I read this in another topic of a theme salient user.

    which replaces the second part of 26, as you have chosen the left-sidebar rather than just sidebar

    yes ?

    so what exactly are you stuck on?


    eefkedigibitch
    Participant

    @eefkedigibitch

    Uh Yes I did the steps you mentioned, so I’m not stuck haha.
    But I also don’t have a sidebar on my page…

    I created a regular page, because I need some info above the forum. I didn’t set a page template or anything. If I do chose the page template left-sidebar, then I do have a sidebar. But that looks the same then when I just add the bbpress widgets to the default left sidebar and don’t do the specific sidebar steps.

    I thought if I use the specific sidebar it would look more like the rest of the forum. Thats why I tried that. Was I wrong?
    So when should someone use the specific sidebar?

    Thanks for your help again!


    eefkedigibitch
    Participant

    @eefkedigibitch

    BTW;
    If I set my forum page to the left-sidebar-template and I click on a forum or a categroy, then next page doesn’t have the sidebar anymore…


    Robin W
    Moderator

    @robin-w

    is the salient theme topic you refer to visible to anyone and if so do you have a link?


    eefkedigibitch
    Participant

    @eefkedigibitch

    We have a placeholder live, but I’ll deactivate it for now.
    This is the link to follow; https://pedantic-lamport.85-17-55-175.plesk.page/forum/

    I just set the page template back to default, so the sidebar isn’t visible.


    eefkedigibitch
    Participant

    @eefkedigibitch

    Hi Robin,

    I activated the placeholder again, so let me know if you need it deactivated.


    eefkedigibitch
    Participant

    @eefkedigibitch

    Hi Robin,

    Can you please help me with this issue?


    Robin W
    Moderator

    @robin-w

    hmmm.. looks like you need a bbpress template in your theme.

    so first you need to create a child theme – the ‘salient’ theme docs should tell you how to do this.

    Then in your salient theme copy the ‘left-sidebar-page.php’ file you created into the child theme, and then rename it ‘bbpress.php’

    That should mean that all bbpress pages use this template.


    Robin W
    Moderator

    @robin-w

    this topic talks about buddypress, but the principal is the same, and not knowing the structure of salient, it might be sidebar.php that you need to use

    https://themenectar.ticksy.com/ticket/150515


    eefkedigibitch
    Participant

    @eefkedigibitch

    Thanks again Robin!
    I’ll ask Salient for help, maybe they know…

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