-
Author
Tagged: RTMedia menu
-
February 3, 2015 at 16:21 #44561
rogeriovaz
ParticipantI have RTMedia installed in my application, but I’m not able to add the link MEDIA menu in TopNavMenu. I don’t have this option.
To add RTMedia in TopNavMenu I wrote a code(bellow) to the functions’ child file.
My questions are:
1 – How add the menu from buddypress interface menu configuration(apparency->menu)?
2 – How could I insert a fontello icon to the ‘Media’ Menu link?
/***************************************************************************/
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 );
February 3, 2015 at 16:38 #44566sharmstr
ModeratorYou can add it using Appearance > Menus. If you look at the bottom of the Kleo selections, it states that you can use ##profile_link##/xxxx to add a link to your profile. Replace xxxx with the menu you want to go to.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
Attachments:
You must be logged in to view attached files. -
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.

