This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
|June 6, 2019 at 3:54 pm #3970707|
I am connecting to another WordPress instance (using same database but different table prefix) from my main WordPress site. My main wordpress site has WPML plugin activated but second site has not. I am using following code:
$args = array(
$query = new WP_Query($args);
The problem is that new connection is not looking directly to blog_posts table but is trying to find post through WPML table causing this problem:
WordPress database error: [Table 'd54525_720.blog_icl_translations' doesn't exist]
Is there any way to disable WPML and enable it after query or change WP query to ignore WPML functions? Thanks for help.
|June 7, 2019 at 3:34 am #3973775|
Languages: English (English )
Timezone: Asia/Kathmandu (GMT+05:45)
Welcome to WPML support. I'd be assisting you further on this issue.
It seems you are trying to run the code in the secondary languages and the default language of the posts from another site is not matching, creating the issue, you can switch language and retrieve the posts in the correct language to see if it helps.
Anyway, custom programming help is beyond the scope of our support.
At this point, I would suggest you consider contacting one of our certified partners from this link: http://wpml.org/documentation/support/wpml-contractors/
Before doing so please have a look also here:
You will get the custom assistance you need to get on with your project.