I have a custom post type called entries, which holds contestants for a competition. There is a 5 star rating function, the ratings are stored with the entries. So...
According to the Query Monitor plugin, WordPress is calling four queries for the last 10 posts in the database, starting with this to know the IDs: SELECT SQL_CALC_FOUND_ROWS wp_posts.ID...
I have a category archive page (press), which I need to loop through posts of a certain tag (magazines). I tried to modify the query with pre_get_posts, but it...
I’m trying to display the related products with my custom html output, unfortunately i’m kind of lost on how to do this. The WP_Query below displays the products that...
I have a bunch of posts titled something like this… English Language 2015 English Language 2016 English Language 2017 English Language 2018 And on each one of these posts...
I have a div and inside I wish display by random a post from category-a or a product from category-b. I’m looking for a query to do that. I...
I need a query to show all posts in the site but not repeat the ones with same tag, I mean only show one post with the same tag....
Closed. This question is off-topic. It is not currently accepting answers. Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or...
I have this code: $query = "SELECT * FROM $wpdb->posts INNER JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id INNER JOIN $wpdb->term_relationships ON $wpdb->posts.ID = $wpdb->term_relationships.object_id WHERE ((post_type="projects") OR (post_type="post_cost_codes"));"; $results...
I have custom posts articles with custom taxonomy tags-articles, I need search all posts with have the term in title, or taxonomy associated with same title (or partial title):...