Hot answers tagged


I suppose you could filter wp_unique_post_slug and have it return the original slug for posts, but I'm not sure what kind of side-effects this may have: add_filter( 'wp_unique_post_slug', function( $slug, $post_id, $post_status, $post_type, $post_parent, $original_slug ) { if ( $post_type == 'post' ) $slug = $original_slug; return $slug; }, ...


Place the following code in your theme's functions.php file: add_filter( 'bp_core_enable_root_profiles', '__return_true' ); I hope this helps.


It would be easier to add this on a menu link. The attributes for each link pass through the nav_menu_link_attributes filter. You should be able to use it to add a custom one, along the lines of (not tested): add_filter( 'nav_menu_link_attributes', function( $atts, $item ) { // check if $item is what you need $atts['data-slug'] = 'something'; return ...

Only top voted, non community-wiki answers of a minimum length are eligible