-
Author
-
April 7, 2017 at 14:35 #157896
wilfriedMarseille
ParticipantHello,
i make some custom function for BuddyPress.
To integrate it in a kleo child theme.
I have to copy paste : buddypress/fbuddypress-function.php
or make a new file bp-custom.php in kleochl/buddypress/bp-custom.php like the buddypress codexApril 7, 2017 at 14:54 #157897wilfriedMarseille
ParticipantI make this code in kleochild/buddypress/buddypress-function.php
and a seconde time in : kleochild/buddypress/bp-custom.phpCOPY CODE<?php //On ajoute cet emplacement à la navigation de BP en passant par le fichier bp-custom.php function my_buddylinks_menu() { if( is_user_logged_in() ) : if ( has_nav_menu( 'bplink' ) ) { wp_nav_menu(array( 'theme_location' => 'bplink', 'items_wrap' =>'%3$s', 'container_class' => 'link-dropdown' ) ); } endif; } add_action( 'bp_member_options_nav', 'my_buddylinks_menu' ); add_action( 'bp_group_options_nav', 'my_buddylinks_menu' ); ?>And this code in function.php to add a menu name bplink in the dashboard/apparence/menu where i put a custom URL with # to make my new menu item in BuddyPress
COPY CODE/*Personaliser le menu BuddyPress Le nouvel emplacement de menu se nomme bplink http://snippetbarn.bp-fr.net/ajouter-un-menu-personnalise-a-la-buddybar/ */ function register_my_menu() { register_nav_menu( 'bplink', 'bplink' ); } add_action( 'after_setup_theme', 'register_my_menu' ); ?>But the new tem doesn’t come.
Do you know why ?
April 10, 2017 at 08:13 #158027Laura
ModeratorHello 🙂 I will be happy to help you! If you could explain me a bit more of what is the idea then i can check it out for you, access to ftp and wp-admin could be helpful to test the codes too 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 10, 2017 at 15:43 #158076wilfriedMarseille
ParticipantHello,
The objective is reorganise my menu item order and add new item.
With this way I make a new menu in my WP/Dashboard.
where i can organise the BuddyPress Main nav in front end ( Activity, Prfile, Friends …. )
(But my code is not working … )The idea is make an item name “bplink” in the buddypress main nav.
And edit the template to this menu part.April 10, 2017 at 15:51 #158080wilfriedMarseille
ParticipantMy Credential :
WP COnnection :
_______________ username :wilfried
_______________ password : PepsiCola1987FTP COnnection : zikreacotqwilly ( id )
zikreacotqwilly.mysql.db ( hote )
HelloWilurtB020687 ( password )
PORT 21April 11, 2017 at 03:15 #158148wilfriedMarseille
ParticipantSo i find the code to add a menu item in the buddypress nav
COPY CODEfunction custom_setup_nav() { global $bp; bp_core_new_nav_item( array( 'name' => __( 'Mes fichiers', 'buddypress' ), 'slug' => 'my-files', //domain.com/members/name/'SLUG' 'position' => 30, 'screen_function' => 'my-files_page' ) ); }and for the redirection page i use this code in function php. but is not working i got a 404 error 🙁
COPY CODEadd_action( 'bp_setup_nav', 'custom_setup_nav' ); function about_page() { add_action( 'bp_template_title', 'my-files_page_screen_title' ); add_action( 'bp_template_content', 'my-files_page_show_screen_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } function about_page_show_screen_title() { echo 'About Page'; } function about_page_show_screen_content() { echo '<h1>helloyou</h1>'; }April 12, 2017 at 00:03 #158264Laura
ModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 13, 2017 at 20:55 #158464Radu
ModeratorHi,
This it’s something custom I cannot offer support for that, it’s to much time consumption.
But I can guide you, try to inspire from here : https://archived.seventhqueen.com/forums/topic/bp-profile-search-inconsistent-behaviour
https://buddypress.org/support/topic/adding-new-profile-tab-content/
Good luck
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.