Viewing 2 replies - 1 through 2 (of 2 total)
  • I encountered the same problem, but solved this problem myself.
    Unfortunately this means we have to edit the plugin’s code ourself, meaning that with any plugin update we have to do it all over again. Let’s hope the Plugin Author will include the code in the next update.

    Change to be made:
    Go the the file
    <your-wordpress-installation>/wp-content/plugins/widget-entries/widget-include-post.php

    Change the following (rule #55):

    if(is_numeric($instance['postwidgetid'])){
    	$content = iinclude_page(intval($instance['postwidgetid']), $params, TRUE);
    }

    To:

    if(is_numeric($instance['postwidgetid'])){
    	if(function_exists('icl_object_id')) {
    		$translatedid = icl_object_id( $instance['postwidgetid'], 'pt-widget', true );
    	} else {
    		$translatedid = $instance['postwidgetid'];
    	}
    	$content = iinclude_page(intval($translatedid), $params, TRUE);
    }

    This code will check if there is a translated version of the widget in the current language. If not, it will show the widget in the default language.

    Thread Starter htrex

    (@htrex)

    Great catch jorn!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Widget Entries] WPML Support’ is closed to new replies.