Thread Starter
valta
(@valta)
Hello
More information about the values :
If the plugin Polylang is not active :
WP_Query[‘tax_query’] =>
Array ( [relation] => and [0] => Array ( [taxonomy] => project_category [field] => id [terms] => 12 ) )
If the plugin Polylang is active :
Array ( [relation] => and )
Polylang is adding some data at this end of the query to filter on the language
Thank you for your support
Valta
Thread Starter
valta
(@valta)
Again to give more information :
the SQL Query from an other module when the plugin Polylang is active :
SELECT SQL_CALC_FOUND_ROWS my_posts.ID FROM my_posts LEFT JOIN my_term_relationships ON (my_posts.ID = my_term_relationships.object_id) LEFT JOIN my_term_relationships AS tt1 ON (my_posts.ID = tt1.object_id) WHERE 1=1 AND ( my_term_relationships.term_taxonomy_id IN (12) AND tt1.term_taxonomy_id IN (6) ) AND my_posts.post_type = ‘project’ AND (my_posts.post_status = ‘publish’ OR my_posts.post_status = ‘acf-disabled’ OR my_posts.post_status = ‘private’) GROUP BY my_posts.ID ORDER BY my_posts.post_date ASC LIMIT 0, 16
And the SQL Query from visual portfolio
SELECT my_posts.* FROM my_posts LEFT JOIN my_term_relationships ON (my_posts.ID = my_term_relationships.object_id) WHERE 1=1 AND ( my_term_relationships.term_taxonomy_id IN (6) ) AND my_posts.post_type = ‘project’ AND (my_posts.post_status = ‘publish’ OR my_posts.post_status = ‘acf-disabled’ OR my_posts.post_status = ‘private’) GROUP BY my_posts.ID ORDER BY my_posts.post_date DESC
Thread Starter
valta
(@valta)
I found i workaround using the post instead of Project type.
As the posts are using different category depending of the language
Best regards
Etienne