paulhuisman on "[Plugin: ElasticPress] WPML and custom post types"

ساخت وبلاگ

Hi,

We are just starting to use Elasticsearch (2.2.1) and the ElasticPress plugin on a multilingual site using WPML. When indexing, it only appears to index a single language. If we use Run Index from Settings > ElasticPress while switched to English, only the English pages are indexed. Similarly when toggled to French. From the Settings page, it appears that it identifies all of the pages on the site, but always quits after finishing the current language (e.g., 3150/6300 items indexed).
When we run "wp elasticpress index --setup", only the English pages are indexed and output only indicates English entries (e.g., Processed 3150/3150 entries)

Is there any specific configuration for multi-lingual.

We are also making use of custom post types and it appears only post_type=page is being indexed.

Thanks,

--rob

https://wordpress.org/plugins/elasticpress/

I think I found a solution for WPML by updating get_index_name in classes/class-ep-config.php. Indexing and search now appears to retu correct language based results.

$site_url = get_site_url( $blog_id );
// WPML support
if ( function_exists('icl_object_id') ) { $site_url = preg_replace('//$/','',apply_filters( 'wpml_home_url', $site_url ));
} // if

paulhuisman
Member
Posted 11 minutes ago #

Hi,

Is there a way to solve this without adjusting the core plugin files? (like with a hook)

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 101 تاريخ : پنجشنبه 2 ارديبهشت 1395 ساعت: 16:41