BuddyBoss Home – Web Support Forums Themes Boss. theme RTmedia button to Buddypanel

  • This topic has 3 replies, 2 contibutors, and was last updated 9 years ago by Anonymous.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Question

    #50305
    @liekjah

    Hello!

    I’m using the Boss theme with SocialLearner(Learndash) and RTmedia.
    I’m trying to add a navigation button to the BuddyPanel with a custom icon.
    RTmedia provide the code below but it doesn’t work properly.
    The ‘My Media’ button is also added to the Top-menu and the MyProfile-menu and when I add an custom icon to the button through a class the link doesn’t work anymore. I also can’t move it to another position.
    I’ve tried the plugin ‘BP direct menu’ but this messed up the site completely.

    I hope there is a solution.

    function my_wp_get_nav_menu_items( $items, $menu, $args ){
    if ( is_user_logged_in() && class_exists( 'RTMedia' ) ) {
    $user_id = get_current_user_id();    // get current logged in user id
    $url = trailingslashit ( get_rtmedia_user_link ( get_current_user_id () ) ) . RTMEDIA_MEDIA_SLUG . '/';     // get user's media link
    // add new menu item to nav menu
    $new_item = new stdClass;
    $new_item->menu_item_parent = 0;
    $new_item->url = $url;
    $new_item->title = 'My Media';
    $new_item->menu_order = count( $items ) + 1;
    $items[] = $new_item;
    }
    return $items;
    }
    add_filter( 'wp_get_nav_menu_items', 'my_wp_get_nav_menu_items', 99, 3 );
    

    Answers

    #50476

    Anonymous
    @

    Hi @liekjah
    I have explained it in following thread
    You will also need to modify header files at which location where that specific menu is called
    https://www.buddyboss.com/support-forums/topic/add-rtmedia-link-to-titlebar-only/
    Regards

    #51444
    @liekjah

    Hi Varun,

    Thank you for your response.
    In the thread you are saying to use the bp-direct-menus plugin.
    I’ve tried this plugin but this messed up the site completely, as I’ve said in my question.
    I can’t add an icon to the buddypanel-menu and I also can’t move it to another position.

    Is there another solution?

    Thanks.

    #51445

    Anonymous
    @

    For default BP menus those could be overridden easily by bp-direct-menus plugin and for any new page you can add custom fontawesome class
    Please let me know for which menu item you are trying to modify the icon
    Regards

Viewing 4 posts - 1 through 4 (of 4 total)
  • The question ‘RTmedia button to Buddypanel’ is closed to new replies.