Video : Short screen recording that illustrates this issue (Jam )
Hi! I’m experiencing an issue with the Query Editor where some parameters are not being respected. Specifically, in my query setup, while the tax_query
filter works as expected, the other parameters such as posts_per_page
and orderby
are being ignored.
return [
'post_type' => 'product',
'posts_per_page' => '50',
'meta_key' => '_total_ordered_count',
'orderby' => 'meta_value_num',
'order' => 'DESC',
'tax_query' => [
[
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => '{term_slug}',
],
],
];
Try to set value of ‘posts_per_page’ without the quotation marks
Hi there, I tried but it still doesn’t work
Hi @StefanTudor ,
Thanks for reporting the issue.
We are aware of the issue if the target post type is product + query Editor + WooCommerce is activated.
Already in the bug tracker.
As a workaround, you can use the PHP filter
Since Bricks 1.3.2 you may manipulate the posts, products, or Query Loop elements query vars before the query is performed like so: The filter callback receives three arguments: If you intend to modify the $query_vars for the WooCommerce product...
Regards,
Jenn
1 Like
timmse
November 11, 2024, 4:12pm
5
Hi guys,
We’ve fixed this issue in Bricks 1.11.1, now available as a one-click update in your WordPress Dashboard.
Changelog: Bricks 1.11.1 Changelog – Bricks
Please let us know if you are still experiencing issues.
Best regards,
timmse