Hello.. Just installed this great plugin and havent yet found an option to change the /mediapress slug and the title of the Gallery tab displayed in buddypress member’s profile page…
I already found a way to change the default /mediapress slug in the documentation:
define( ‘MPP_GALLERY_SLUG’, ‘galeria’);
now, to rename the title of the Gallery tab in the member’s nav menu, I made this created this little snippet to put in my child theme’s functions.php file:
function shibumi_rename_mediapress_profile_tab() {
$nomegaleria = sprintf(__(‘Galeria <span>%d</span>’, ‘mediapress’), mpp_get_total_gallery_for_user());
buddypress()->members->nav->edit_nav( array( ‘name’ => __( $nomegaleria, ‘mediapress’ ) ), ‘galeria’ );
}
add_action( ‘bp_actions’, ‘shibumi_rename_mediapress_profile_tab’ );Now I can have my custom title (Galeria) and keep showing the number of gallery’s in it…
Would you guys have a better solution? I’m new to wordpress and php…
Thanx 😀
Hi Lawlyet,
Welcome to BuddyDev.Thank you for the kind words.
Please avoid using code to change the label. It is not efficient.
I will suggest translating the plugin(You can translate only the strings you want to change), That will be a better way.
Please see translating plugin here
Regards
BrajeshHi Beuza,
happy new year to you too.Let us keep this discussion on the new topic
https://buddydev.com/support/forums/topic/mediapress-and-wpml/#post-12953
Marking this as resolved/closed.
Regards
Brajesh
The topic ‘ [Resolved] Rename Gallery tab title in members navigation’ is closed to new replies.