Ultimate Branding Text Change Not Working

I would like the error that shows up at (example) https://christiangays.com/join-us/registration/?member_id=97&code=aba835bac15f4319893909172b32a01f

Error! The unique registration code you used in the URL has already been used or it is invalid!

to read

This content is for members only. Please login or join us if you are not yet a member.

It isn't working

  • Kasia Swiderska
    • Support nomad

    Hello Mary,

    I can confirm this is not working on your site but without checking source code of the plugin that generates it (eMember) I'm not able to tell why text change is not applied for this text string.
    In some cases there are hidden characters in code that are not visible in output code thus Ultimate Branding cannot adjust searched phrase. Or this string can be generated after Ultimate Branding finished searching for the texts to replace.
    If you can share copy of this plugin with me I can test it and provide solution if possible. Or you could try to use fake translation file to change this text (you would need to translate your site from English to English using po and mo file https://premium.wpmudev.org/blog/how-to-translate-a-wordpress-plugin/ where you would only "translate" texts you need to change).

    Could you please send in the following via our secure contact form https://premium.wpmudev.org/contact/ :

    - Mark to my attention, the subject line should contain only: ATTN: Kasia Swiderska
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - link to zipped eMember plugin on service like Dropbox or Google drive
    - Include any relevant URLs for your site

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    kind regards,

  • Kasia Swiderska
    • Support nomad

    Hello Mary,

    Thank you for sending plugin. I checked it's code and I can suggest that you report bug for eMember developers - this one text string is hardcoded in plugin, therefore is not translatable and because it's not wrapped in any of the functions for translating like __() , _e() Ultimate Branding text change module can't "see" it. Hardcoding string like those is very bad coding practice because at this moment using fake translation file or filter gettext is impossible.

    For now I can suggest adding this code to your theme functions.php file

    function wpmudev_textchange_emember() {
    <script type="text/javascript">
    	jQuery('span.emember_error').text('This content is for members only. Please login or join us if you are not yet a member.');
    add_action('wp_footer', 'wpmudev_textchange_emember' );

    it uses jQuery to change text.

    kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.