Salta la navigazione

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.

Lasciare una risposta

Ti preghiamo di rimanere in tema e di essere rispettoso nei confronti degli altri. Se hai bisogno di aiuto per questioni non correlate a questo post, utilizza il nostro Forum di supporto per avviare una chat o inviare un ticket.

Potete usare questi tag:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>