It looks like you have the function both in bp-custom.php and in your plugin.
You don’t need a plugin.
Put your code in plugins/bp-custom.php only.
Or in your-theme/functions.php
Related Posts:
- WordPress Stripping Colons?
- Mega Menu Walker
- Displaying Logged-In User Name in WordPress Menu
- How can I limit the length of the previous/next posts in my WordPress Theme?
- Conditional Statement – check if post has an attachment image
- How do I add a php statement to a jQuery string
- Adding Field to Profile “Name”
- Trying to use Ternary operators with WP Conditionals
- the_author_meta not working
- How can I default to all WordPress roles when parameter is not included in shortcode?
- Removing WordPress profile fields from non-admins
- Logout and redirect using the WP Menu
- How to do conditional publishing?
- Second Navigation inside header
- Remove username in emails or swap username for email
- Help with adding pagination to custom wp_query
- How can I add a custom class to only nav sub-menu > li > a items in WordPress?
- items_wrap not working
- conditional statement for custom taxonomy
- Style wp_page_menu() items
- BuddyPress User Profile Menu
- Add user settings to specific roles
- How to display conditional-content if wp_nav_menu( $args ) retruns something
- Create a new usermeta field for users
- Change Navigation Bar based on logged in or not
- Multiple WordPress Menus that will only display all pages
- Redirect to a different page through registration, depending on page
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- How to Arrange PHP Files to Allow for Multiple Types of Pages?
- What is the correct way to write this conditional statement?
- Custom profile field with birthday. Troubles with
- Menu Limitations
- Show css depending on activity type in BuddyPress activity-loop [closed]
- Making BuddyPress Activity Stream (Post Type) Featured Images Clickable [closed]
- How to remove role=”navigation” from all nav elements?
- How to show all pages in blog navigation?
- How to retrieve current wordpress profile page URL?
- How do I programmatically set a user as spam in BuddyPress? [closed]
- Custom Walker_Nav_Menu issue with variables on PHP 7.3
- Modify user profile data through scripting?
- Help with Sub and Sub-Sub Navigation
- Detecting classes, adding widgets, and adding divs in with a Nav Walker
- Is_front_page inside header.php is always returning true
- Advanced Custom Fields – display label and value only if value entered
- PHP conditional script issue
- How to check if the current page is at a specified path in the URL?
- Buddypress update user avatar image via REST
- How to style one item from main navigation?
- Add login hyperlink to secondary navigation menu
- Add class to DIV depending on page loaded
- Help with page nav?
- Override user-edit.php to design own profile page
- Can I set up a hover animation in CSS depending on a PHP conditional?
- After adding my website to a new server, I keep getting a unexpected end of file error, but the file is identitcal to it’s original source
- Menu Custom Data Attributes
- How to Handle Going Backwards in Navigation When Referrer in PHP/JavaScript won’t work?
- How can I get “Previous” and “Next” to show in the navigation besides the links?
- Multidimensional Array
- How to modify mobile nav menu text in theme
- Conditional featured image with youtube thumbnail
- Why BuddyPress fields not saving?
- Change homepage content if user is logged in – BuddyPress
- How to do something when user profile rendereing?
- How to make a conditional statement within $output in shortcodes.php?
- php return username of currently viewed author profile
- Nav-Menu not showing up
- implementing a jQuery “click to expand” link in WordPress [closed]
- posts_nav_link pulling in multiple post types
- Custom navigation menu with awsAccordion
- Make next post button link to random post
- is user member of a group, show them categories [closed]
- Why can’t I add a custom image in my navigation?
- Conditionally remove comments and post meta in functions.php
- Wp favorites posts by specific category? [closed]
- Display multi-select box choices in a bullet list [closed]
- exclude custom post type from running a function
- include content within conditional statement?
- Customize field names in backend profile edit page through function.php [duplicate]
- Remove the Tag from wp_nav_menu
- Customize Buddypress adminbar [closed]
- Adding a navigation page state to individual blog and portfolio pages
- Show label for value only when value exists, basic php
- Prevent Buddypress Rewrite Rules on Non-Buddypress pages/posts
- WordPress navigation wont appear with wp_head
- Generate a QR code when creating a new WordPress user
- In PHP how do I make my navigation bar show certain links to admins only?
- copy fields value to another field
- I want to show cart items number if any or nothing, simple CART text
- How to set Nav as a default menu in wordpress
- Conditional formatting on data fetched from MYSQL
- Find and print first entry from WordPress post in custom excerpt?
- How to add locations input to user profile?
- Adding if statement
- Updating User Profile information removes image
- Redirect User when they click Menu Option
- Change Login or Logout text based on status
- How do I visualize the author’s post from the front end?
- Following/Followers Users list Using Ajax Pagination inside Author Profile
- How to create a sub-page of sub-page?
- Change username link in admin bar