Skip to:
Content
Pages
Categories
Search
Top
Bottom

rename Directory “Type” text to custom Text


  • mionigba
    Participant

    @mionigba

    Hello everyone,

    My Organisation has branches in different locations:
    — Ikeja.
    — Victoria Island.
    — Lekki.
    — Sanders Almond Road, Maryland.
    and so on.

    These are Member Types, but I want them to be translated as “Locations”.

    So I used the code below:

    add_filter( 'bp_members_member_type_base', function( $base ) {
    
    	// Replace custom with your desired string.
    	return _x( 'custom', 'member type URL base', 'buddypress' );
    } );

    to help me call them “Locations”– as what they are, as you can see here — https://prnt.sc/l0ypmQxEGzSP

    2.) You will notice that in my screenshot, when I want to view members of a specific directory who belong to a specific location, it says “Viewing members of the type: Maryland”.

    Now, Maryland is a location. Instead of using the word/text “Type”, I want that text to say “Location”– so that it becomes “Viewing members of the location: Maryland”.

    Is there any PHP Code Snippet that can help me change that Text from “Type” to “Location” ?

    Regards.

  • You must be logged in to reply to this topic.
Skip to toolbar