Skip Navigation

Resolved by author

Resolved in: WpResidence 5.0.4

Topic Tags: Compatibility

Overview of the issue

In WPResidence theme, the “Select User Type” dropdown in the registration modal fails to show translated user types on secondary language pages. Instead, when the registration modal is accessed on a translated page, the dropdown is empty.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open ../wp-content/plugins/wpresidence-core/misc/plugin_help_functions.php file.
  • Look for line 285.
  • Replace:
      $user_type = array(
        esc_html__('User','wpresidence-core'),
        esc_html__('Agent','wpresidence-core'),
        esc_html__('Agency','wpresidence-core'),
        esc_html__('Developer','wpresidence-core')
      );
    
  • With:
        if (class_exists('sitepress')) {
            $user_type = array(
                esc_html__('Select User Type', 'wpresidence'),
                esc_html__('User', 'admin_texts_wpresidence_admin'),
                esc_html__('Single Agent', 'admin_texts_wpresidence_admin'),
                esc_html__('Agency', 'admin_texts_wpresidence_admin'),
                esc_html__('Developer', 'admin_texts_wpresidence_admin'),
            );
        } else {
            $user_type = array(
                esc_html__('Select User Type', 'wpresidence'),
                esc_html__('User', 'wpresidence'),
                esc_html__('Single Agent', 'wpresidence'),
                esc_html__('Agency', 'wpresidence'),
                esc_html__('Developer', 'wpresidence'),
            );
        }
    
  • Then go to WPML > String Translation page and click on the “Translate texts in admin screens »” link.
  • Look for the different roles (User, Agency…) under the [wpresidence_admin][wp_estate_visible_user_role] name and add them to String Translation.
  • Return to WPML > String Translation page and translate them.

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>