Are you looking for a way to change the permalinks in BuddyPress for activity streams, blogs, members, friends, etc? While there’s probably a plugin for this, we have created a quick code snippet that you can use to change permalinks for BuddyPress activity, blogs, members, friends, etc.
Instructions:
All you have to do is add this code to your theme’s wp-config.php file:
define ( 'BP_ACTIVITY_SLUG', 'streams' ); define ( 'BP_BLOGS_SLUG', 'journals' ); define ( 'BP_MEMBERS_SLUG', 'users' ); define ( 'BP_FRIENDS_SLUG', 'peeps' ); define ( 'BP_GROUPS_SLUG', 'clubs' ); define ( 'BP_MESSAGES_SLUG', 'notes' ); define ( 'BP_WIRE_SLUG', 'pinboard' ); define ( 'BP_XPROFILE_SLUG', 'info' ); define ( 'BP_REGISTER_SLUG', 'signup' ); define ( 'BP_ACTIVATION_SLUG', 'enable' ); define ( 'BP_SEARCH_SLUG', 'find' ); define ( 'BP_HOME_BLOG_SLUG', 'news' );
You can only paste the code you need to change the permalinks for.
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.
If you liked this code snippet, please consider checking out our other articles on the site like: 27 best WordPress themes for travel blogs and how to start a blog.
Hi
This does not work for me.
Still the slugs are the same.
ıs there a plugin to do that.
Thanks
Hello, I have updated the code, the best way is to add it to the theme’s “
functions.php
” not the theme’s “wp-config.php
” fileCheck out the code to add above.
If you are looking for a plugin, we recommend WPCode. Actually, the free version can help you with this.
You can search for “WPCode” in your plugin repository to install it.
1. Go to Code Snippets > + Add Snippet in your WordPress dashboard.
2. Then, select the “Add Your Custom Code (New Snippet)” option.
3. You can give your snippet a title (e.g., “Change BuddyPress Slugs”) to make it easy to identify.
4. Then, paste the code above into the editor.
5. Below the editor, set the Code Type to PHP Snippet.
6. You can choose to run the code everywhere or on specific places, for this, just leave it as everywhere.
the good thing is, WPCode will also tell you if there is an error.
Finally activate the code at the top.
That’s it.
Check out this WPCode review if you need any help. We explain how to use the different code features the plugin comes with.