Sauter la navigation

Open

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.

Laisser une réponse

Veuillez rester dans le sujet et respecter les autres. Si vous avez besoin d'aide pour des questions qui ne sont pas liées à ce message, utilisez notre Forum d'assistance pour entamer une discussion ou soumettre un ticket.

Vous pouvez utiliser ces balises :
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>