-
Author
-
February 28, 2015 at 22:09 #48167SKSParticipant
Hi!
How can I put these or some of these items (in the screendhot) in the header?Attachments:
You must be logged in to view attached files.March 1, 2015 at 06:01 #48220LauraModeratorHello, those are fontello icons, can be hanged with css, here is a list of the classes to change those icons, you will find fontello icons included in kleo in your documentation assets/css/fontello.css
ActivityCOPY CODE#buddypress div#item-nav ul #activity-personal-li a:before, #buddypress div#item-nav ul #home-groups-li a:before { content: "\e8ed"; }
Profile
COPY CODE#buddypress div#item-nav ul #xprofile-personal-li a:before { content: "\e98e"; }
Notifications
COPY CODE#buddypress div#item-nav ul #notifications-personal-li a:before { content: "\e863"; }
Messages
COPY CODE#buddypress div#item-nav ul #messages-personal-li a:before { content: "\e98c"; }
Friends
COPY CODE#buddypress div#item-nav ul #friends-personal-li a:before { content: "\e98f"; }
Settings
COPY CODE#buddypress div#item-nav ul #settings-personal-li a:before, #buddypress div#item-nav ul #admin-groups-li a:before { content: "\e98b"; }
You can share an user account of your website with me so i can give you the other icons classes 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 1, 2015 at 20:41 #48286SKSParticipantHi Laura!
I dont want to change the icons, I want to change their locations. I need them in the HEADER of the theme. Right now they are below the cover image of a profile.
Thanks
March 1, 2015 at 20:59 #48289SKSParticipantHere’s the screenshot:
I want to put these in the header
Attachments:
You must be logged in to view attached files.March 3, 2015 at 05:36 #48484LauraModeratorHello 🙂 Sorry for the confusion.
Those links are generated dynamically, so you cannot just make an url to them, but with this function, you can add an empty page in Pages, with each sections name (Activity, Profile, Notifications, Messages, Friends, Groups, Media, Settings) And you can also add extra with a simple change.
Here it is:
Add this to functions.php in child theme
Create a new page with each section name , for example page Profile, page Messages…COPY CODEfunction redirect2profile(){ include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if($_SERVER['REQUEST_URI'] == '/profile/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ global $current_user; wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/profile/'); exit(); } if($_SERVER['REQUEST_URI'] == '/activity/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ global $current_user; wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/activity/'); exit(); } if($_SERVER['REQUEST_URI'] == '/messages/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ global $current_user; wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/messages/'); exit(); } if($_SERVER['REQUEST_URI'] == '/notifications/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ global $current_user; wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/notifications/'); exit(); } if($_SERVER['REQUEST_URI'] == '/friends/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ global $current_user; wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/friends/'); exit(); } if($_SERVER['REQUEST_URI'] == '/groups/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ global $current_user; wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/groups/'); exit(); } if($_SERVER['REQUEST_URI'] == '/media/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ global $current_user; wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/media/'); exit(); } if($_SERVER['REQUEST_URI'] == '/settings/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ global $current_user; wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/settings/'); exit(); } } add_action('init', 'redirect2profile');
This functions makes a redirect to those profile parts if a page has the name of it, you can change it as you want, for example:
COPY CODEif($_SERVER['REQUEST_URI'] == '/settings/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ global $current_user; wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/settings/'); exit(); }
This makes that the page that has the slug “settings” will redirect to the logged in user “settings” page.
Just create empty pages for each link and place them in your menu, if you dont want to show those links to not logged in users, use the plugin attached, it lets you have a dinamic menu for logged in/out usersTo add more links like “sites” just paste the sample code before the last } of the above code and change the name of the slugs.
SAMPLE CODE
COPY CODEif($_SERVER['REQUEST_URI'] == '/EMPTY-PAGE-SLUG/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ global $current_user; wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/BUDDYPRESS-URL-SLUG/'); exit(); }
To add icons to your new menu links, you can go to Appearance > Menu and choose an icon for them
Or you can use this plugin for already made buddypress menu links but on sidebar as a widget
https://wordpress.org/plugins/buddypress-custom-profile-menu/Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
Attachments:
You must be logged in to view attached files. -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.