filter RSS feed in URL
filter RSS feed in URL
filter RSS feed in URL
See WP_Query as reference for the post query filters. You can filter posts by their authors with the ‘author’ query var as you filter posts by their taxonomy with ‘tax_query’ query var. Then, conditionally set the ‘tax_query’ query var depending on the user’s company meta field. If it’s empty, set the ‘author’ query var instead. … Read more
wpdb php get_var query to get ID for URL image doesn’t work for ID over 999
$wpdb->replace: WHERE?
How to prevent redirect when using the term “page” in query string?
Long running queries
woocommerce get_price_html not pulling in correct price
Form redirect with query vars to page
This isn’t really a WordPress question as it’s just standard SQL, so it doesn’t really belong here, but I have some points to make about your use of $wpdb->prepare() so will answer the question. So, let’s look at your WHERE clause, isolated, with values substituted, and indented to reflect how it will be interpreted: WHERE … Read more
As @milo said in the comments, the cat parameter (and similar parameters in other hierarchical taxonomies) will make the query look in subcategories as well. If you do not want that to happen use the category__in parameter. As for the general slowness, it is hard to guess, but it depends on your DB server performance … Read more