Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #336396

    Lely
    Moderator

    Hello There,

    Yes that is possible by adding some conditional statement to the function so it will display different widget for specific page. Please refer to this link: https://codex.wordpress.org/Conditional_Tags
    Further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding.

    #336429

    khomiko
    Participant

    I’m not 100% sure how to read this code. Would you mind giving me an example of how to put a custom sidebar on this page: http://www.ix3gaming.com/groups/league-of-legends/. I only want it for the league of legends group forums.

    add_filter('ups_sidebar', 'force_bbpress_sidebar', 20);
    
    function force_bbpress_sidebar ( $sidebar ) {
    return x_is_bbpress() ? 'REPLACE_THIS_WITH_SIDEBAR_ID' : $sidebar;
    }
    #336618

    Paul R
    Moderator

    Hi,

    You can try this code instead.

    
    add_filter('ups_sidebar', 'force_bbpress_sidebar', 20);
    
    function force_bbpress_sidebar ( $sidebar ) {
    if(bp_get_current_group_slug() == "league-of-legends"){
       return 'REPLACE_THIS_WITH_SIDEBAR_ID';
    }
    }
    

    Hope that helps.

    #338813

    khomiko
    Participant

    I tried it, it works, and I love you for it! The only problem is that it stops all my default sidebars from loading everywhere else. Any idea as to why?

    #339023

    Paul R
    Moderator

    Hi,

    Sorry about that, please replace it with this.

    
    add_filter('ups_sidebar', 'force_bbpress_sidebar', 20);
    
    function force_bbpress_sidebar ( $sidebar ) {
    if(bp_get_current_group_slug() == "league-of-legends"){
       return 'REPLACE_THIS_WITH_SIDEBAR_ID';
    } else {
       return $sidebar;
    }
    
    }
    

    Hope that helps.

    #339500

    khomiko
    Participant

    I thought it might have needed an else in there lol, I just didn’t know how to write it. I’m very appreciative of this! THANK YOU 😀

    #339755

    Friech
    Moderator

    We’re delighted to assist you with this. Cheers!

    #589843

    goughs
    Participant

    Hello
    I’d like to add my custom forum sidebar (ups-sidebar-forum-sidebar) to my main forum page but am having difficulties. Can you help?
    In appearance/sidebars/manage sidebars I have created a sidebar called ‘forums’ and placed within it the widgets I need and have ticked ‘forums’ under ‘All pages and posts’. I though that would do the trick but it hasn’t.
    http://www.bkdigitalexplorers.org
    Thanks
    Phillip
    screenshot

    #599183

    Christopher
    Moderator

    Hi there,

    Please select one of content layout with sidebar from Customize -> Layout and design.
    Also setup a child theme and add provided code in functions.php file.

    Thanks.

    #603194

    ignaciosantiago
    Participant

    Hi,

    I still have this upgrade in my child theme functions, but after the update the sidebar goes down (after the content (see attachment).

    One more thing, hoy do i change the font color of the “edit” “quote” “replay” “spam” etc buttons on top of each reply or topic???

    #603404

    Jade
    Moderator

    Hi there,

    #1 I have just checked on the sidebar of your site and it is displaying correctly on the right. Please refer to the screenshot below. If you are having the issue on a specific page, kindly point us out to that page.

    #2 Please add this in the Customizer:

    .x-bbp-item-info-header .bbp-admin-links a {
        color: red;
    }

    Hope this helps.

    #605320

    ignaciosantiago
    Participant

    I solved it myself in the customizer. Thanks

    #605474

    Jade
    Moderator

    You’re most welcome.

    #608053

    ignaciosantiago
    Participant

    How can i change the border color of those links to black?

    #608129

    Paul R
    Moderator

    Hi,

    You can add border to the code given above.

    
    .x-bbp-item-info-header .bbp-admin-links a {
        color: red;
        border:1px solid black;
    }
    

    Hope that helps.