AND and OR in my CPT search query depending on checkbox
AND and OR in my CPT search query depending on checkbox
AND and OR in my CPT search query depending on checkbox
Include custom post type that matches taxonomy field in another custom post type
How to speed up WP_Posts_List_Table __construct() Query on a wordpress website with over 1 million posts?
How to short circuit a wordpress query that is not related to posts?
You are right to say: Never use query_posts anymore pre_get_posts pre_get_posts is a filter, for altering any query. It is most often used to alter only the ‘main query’: add_action(‘pre_get_posts’,’wpse50761_alter_query’); function wpse50761_alter_query($query){ if( $query->is_main_query() ){ //Do something to main query } } (I would also check that is_admin() returns false – though this may be … Read more
WP_Query filtering in ACF field containing dates
When you set WordPress up with: The set-up Custom Permalink Structure: /blog/%postname%/ Category base: blog Generated rewrite rules WordPress generates these rewrite rules: blog/([^/]+)(?:/([0-9]+))?/?$ => index.php?name=$matches[1]&page=$matches[2] blog/(.+?)/?$ => index.php?category_name=$matches[1] Rewrite rule position in the rewrite_rules_array Your post rewrite rule (#1) is positioned earlier (therefore higher priority) than the category rewrite rule (#2) in your rewrite_rules_array. … Read more
filter the custom post type using wp ajax request
I need help with filter products in custom teplate
It looks like you want to list products with post_type=product etc.. AND have the same ean code. Therefore, in your place i would try with the line ‘relation’ => ‘OR’ changed to ‘relation’ => ‘AND’ Regards,