Support » Plugin: Elementor Custom Skin » WPML Compatibility

  • Resolved wphussain

    (@wphussain)


    dudaster, thank you very much for this plugin. I can’t believe Elementor hasn’t included this even after a full year of git comments.

    I am almost done building a website for a client and your plugin has been an amazing help. It is a Multilingual site with English and Arabic using WPML.

    I have encountered a small roadblock. The loops are not loading the Arabic translation. All other Elmentor default templates such as Header and Footer are loading the Arabic translations just fine but the loops are not. Is this a bug or am I missing something? I have tried deactivating all the plugins but it does not seem to work.

    Could you please provide any help on this?

    See screenshots:
    1- https://pasteboard.co/IerXwF0.png
    2- https://pasteboard.co/IerXlwF.png

    Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • For the time being, I am using the following workaround:

    in skin-custom.php

    change this code

    $templates = $wpdb->get_results( 
    					"SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_title as post_title FROM $wpdb->term_relationships
    						INNER JOIN $wpdb->term_taxonomy ON
    							$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
    						INNER JOIN $wpdb->terms ON 
    							$wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop'
    						INNER JOIN $wpdb->posts ON
    							$wpdb->term_relationships.object_id=$wpdb->posts.ID"
    				);

    to this

    if (ICL_LANGUAGE_CODE == "ar") {
    				$templates = $wpdb->get_results( 
    					"SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_title as post_title FROM $wpdb->term_relationships
    						INNER JOIN $wpdb->term_taxonomy ON
    							$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
    						INNER JOIN $wpdb->terms ON 
    							$wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop-ar'
    						INNER JOIN $wpdb->posts ON
    							$wpdb->term_relationships.object_id=$wpdb->posts.ID"
    				);
    			}
    			 else {
    				$templates = $wpdb->get_results( 
    					"SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_title as post_title FROM $wpdb->term_relationships
    						INNER JOIN $wpdb->term_taxonomy ON
    							$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
    						INNER JOIN $wpdb->terms ON 
    							$wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop'
    						INNER JOIN $wpdb->posts ON
    							$wpdb->term_relationships.object_id=$wpdb->posts.ID"
    				);
    }

    Replace ar with your lang code. Notice that you have to change it on 2 instances.

    Hope this help.

    • This reply was modified 6 months, 1 week ago by wphussain.
    • This reply was modified 6 months, 1 week ago by wphussain.

    I tried for spanish:

    if (ICL_LANGUAGE_CODE == "es") {
    				$templates = $wpdb->get_results( 
    					"SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_title as post_title FROM $wpdb->term_relationships
    						INNER JOIN $wpdb->term_taxonomy ON
    							$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
    						INNER JOIN $wpdb->terms ON 
    							$wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop-es'
    						INNER JOIN $wpdb->posts ON
    							$wpdb->term_relationships.object_id=$wpdb->posts.ID"
    				);
    			}
    			 else {
    				$templates = $wpdb->get_results( 
    					"SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_title as post_title FROM $wpdb->term_relationships
    						INNER JOIN $wpdb->term_taxonomy ON
    							$wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
    						INNER JOIN $wpdb->terms ON 
    							$wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop'
    						INNER JOIN $wpdb->posts ON
    							$wpdb->term_relationships.object_id=$wpdb->posts.ID"
    				);
    }

    With no success, am I missing something?

    TIA

    Plugin Author dudaster

    (@dudaster)

    I don’t have a WPML license so I can’t say how it would properly work, but in polylang I have 2 archive pages for example and you I make a custom skin for each language.

    Plugin Author dudaster

    (@dudaster)

    Thanks everybody!

    Issue fixed.

    Update the latest version!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WPML Compatibility’ is closed to new replies.