Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

mrjive on "[Plugin: Events Manager] Event list widget displaying events in all languages"

$
0
0

Hi, thanks for the reply.

I tried to modify the plugin. I added "language" field in this file:

events-manager/widgets/em-events.php

adding the following at the end of the "function form($instance)":

<p><label for="<?php echo $this->get_field_id('language'); ?>"><?php _e('Language','dbem'); ?>: </label>
<input type="text" name="<?php echo $this->get_field_name('language'); ?>" value="<?php echo (!empty($instance['language'])) ? $instance['language']:__('Language', 'dbem'); ?>"></p>

and it automatically filtered by language.

I know it's not well done at all, but for now it's working. I'm not an expert coder, but I'll try to make it better (like checking if polylang is installed, to give the option to ignore the language filed....) and maybe submit it to the team.

ciao!


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>