Hi,
I’m experiencing a critical issue caused by the theme.
Even with only WooCommerce and Elementor enabled, my website is generating continuous SQL errors in the log.
Here is the error:
WordPress database error Unknown column ‘posts.ID’ in ‘IN/ALL/ANY’
Example from the error log:
AND posts.ID IN (
SELECT tr.object_id
FROM wp_term_relationships AS tr
WHERE tr.term_taxonomy_id IN (…)
)
The issue seems to come from the theme (or a function inside the theme) modifying the WP_Query and injecting a condition that uses posts.ID.
However, WordPress uses the default table name wp_posts and no alias named posts exists, which causes MySQL to throw the error “Unknown column ‘posts.ID'”.
To confirm the source of the problem, I switched the theme to Storefront, and the issue immediately disappeared.
So the problem is definitely caused by the theme.
I also tried re-uploading the theme, the theme’s companion plugin, Elementor, and WooCommerce through the hosting panel and extracted them again, but the issue did not get resolved.
Please review the part of the theme code where filters like posts_where, pre_get_posts, or custom SQL conditions are added.
The incorrect posts.ID should be replaced with:
{$wpdb->posts}.ID
or at minimum:
wp_posts.ID
This bug currently breaks multiple queries, including:
WooCommerce product queries
Elementor templates
Elementor Floating Buttons module
Maintenance Mode templates
Any frontend WP_Query execution
Please provide a fix or a patch in the next update, as this issue causes constant SQL errors and affects site functionality.
This message was written with the help of AI — apologies if any part is unclear.
Thank you.