Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Customize Profile (Memebers) Form? (Minor Changes) | Event Espresso - Staging Server

Support

Home Forums WP User Integration Customize Profile (Memebers) Form? (Minor Changes)

Customize Profile (Memebers) Form? (Minor Changes)

Posted: June 19, 2013 at 6:20 pm

Viewing 4 reply threads


Josh

June 19, 2013 at 9:49 pm

Hi Cam,

This is something you can change by using the WordPress gettext filter. Basically you can copy and paste a function like this in your WordPress theme’s functions.php file:

function mycustom_filter_gettext( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Events Profile Information' => 'Additional Information',
        'City/Town/Village' => 'City',
        'Please enter your City/Town/Village.' => 'Please enter your City.'
        // You can add some more strings here
    );
 
    // See if the current string is in the $strings array
    // If so, replace it's translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );


Cam Bassignan

June 20, 2013 at 12:39 am

Great! This worked…

Is there a way to “unset” the country field in the functions.php so it doesn’t show up? This isn’t super important, but I don’t really need the field. If there is not a way…..no problem.

I would suggest, as a future feature, to make this form into a template. It would make it easier to style the form and making these types of changes for those placing it on the front end instead of in the WordPress Dashboard (like I am doing).

Thanks for your help!


Josh

June 20, 2013 at 9:21 am

Hi Cam,

You can modify all this at will by using the WordPress remove_action and add_actions. I put up a gist that outlines exactly how to remove the country field and add an additional CSS class for styling the form template. You can copy/paste this into your theme’s functions.php file. It adds some sanitization to the input fields too.

https://gist.github.com/joshfeck/5823688


Cam Bassignan

June 20, 2013 at 12:41 pm

Perfect!!! Exactly what I was looking for and to accomplish. This helps a bunch.

Thanks again for your help!

Viewing 4 reply threads

The support post ‘Customize Profile (Memebers) Form? (Minor Changes)’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso - Staging Server