The problem here is not that the posts that are being wrongly displayed are displayed under the wrong category, it’s that they’re not actually in the right category. For example, the post “Supporting healthy eating choices” is displayed under “O” as it has the category “O”. Going to your backend and assigning the proper category to these posts should fix it. In short, there’s nothing wrong with your code, some of your posts just belong to the wrong categories.
Related Posts:
- Very slow query
- Does meta_query work within get_posts array?
- How to show more than 5 posts?
- How to optimize my query filtering out unwanted data?
- Remove posts from query for events whose start date has passed
- get_posts() loop returns the same the_title() for each post
- List all posts from past week grouped by sub-category
- Order posts by custom field DATE value
- How do I see the mysql query generated by get_posts( $args )?
- Create Indexes for Slow Queries
- get_posts showing only 5 posts. (nopaging and posts_per_page -1 not working)
- pre saved posts query from db options table
- Re-sort get_posts query results
- Can I include get_posts in this array?
- How can I get posts by 2 meta keys, prioritising one of them?
- Category_in return empty
- Custom query_var causes displaying posts archive on front page
- What is the most efficient way of implementing a favorite post system?
- Why does get_the_time(‘F j’) return November 30 for all posts?
- Query by one meta_key and sort by another (possibly NULL value)
- Query & Sort Comments by custom comment meta
- is_archive() doesn’t work on public query var archive pages?
- How to count get_users query?
- cron job to auto delete posts of a specific post type older than x days
- Possible to get posts from multiple meta keys/values in a single query?
- Difference between fragment caching and wp_cache
- How to display all posts with today’s same month and day only?
- Select User by Joining Multiple Meta Value Results
- How do I find if a page has a template?
- Show featured image as background image from postQuery
- Using $wpdb->update but confused on the WHERE in and SET
- You have an error in your SQL syntax – Help with query
- Make one query for adding entries to database
- WordPress Loop: List All Posts by a Category & Subcategory
- add_query_arg() and empty variables inside
- Query Strings and Woocommerce
- Get posts by name and taxonomy term
- Style Post Differently In Query
- WordPress post type “event” query string fix?
- how would I create a custom query to get all users, and a related post based on a postmeta field?
- order one custom post type by modified time of another post type
- is_search called incorreclty
- Function to delete a post, it’s children and it’s grand children (half way there already)
- Nested loop : wich way/order?
- Dynamically adjust single-posttype.php query, based on current taxonomies
- Passing parameters to a static front page
- Use mysql_query instead of $wpdb query
- Post with certain term and without any term
- Custom Query – Based on user input
- Change the destination of the URLs in post.php
- Page with custom template make get request to a custom route – Pseudo code
- get_users with array as meta_value
- How to exclude posts for current user
- Valid SQL query return empty
- mysql query – how to escape apostrophe?
- $wpdb->prepare affecting the query?
- WordPress SQL search, how to handle SQL Injection?
- exclude pingbacks from wordpress SQL query
- wp_posts query slowing down my website
- Loop through incrementing custom fields
- Get the_field of Advanced Custom Fields in a custom query [closed]
- Advanced Custom Fields – Relationship post foreach query
- How to manage a particular “order by” for get_search_query()?
- How do I query for posts by custom meta and those that have been stickied?
- Select min/max meta from query
- WordPress query unique post meta – finding all of one value without duplicates for a drop down
- Exclude in get_pages() based on meta field
- How to get a random single category name in get_posts()?
- SQL to Query the db and return all posts and it’s metas
- Query Post interferes with Pagination
- How to do a sql like query on serialized data of user meta data
- My archives page won’t sort posts by month
- Order WordPress Query by Custom Field While Still Using Tax_query Argument
- How to get all images in Media Gallery with pagination?
- Attachment page tag queries & posts not found
- Not getting input from get_query_var
- New custom post type entries are not sorted correctly in admin using pre_get_posts
- Query String for the WP_QUERY parameters
- Performance of wp_get_attachment_image_srcset() and wp_get_attachment_image_url()
- YearMonth datequery
- Query Posts that have or don’t have a meta_value and order by the same ASC
- What is the best way to query posts based on live data?
- numberposts not responding to wp_reset_postdata()
- Why the pre_get_posts hook can cause apache stopped working?
- Query for distance OR taxonomy term
- Sorting of coupons in the right way
- How to query custom post type one after another
- How to display a specific category using a custom Query in WordPress?
- Apply ordering args to newly merged queried
- excludeCat function reverses order of blog posts
- Run search query again without pagination gives no results?
- Retrieve posts in custom post type and specific taxonomies
- Mysql query and odd results
- WP_Query orderby meta key/value suddely stopped working
- How to get one result using wpdb class?
- Delete query won’t run
- Where can I find the SQL to get the most used information by wordpress database?
- WooCommerce Total # orders [closed]
- Modify a query using both a text field and a true/false AFC field
- How to figure out correct wp_options to have autoload=’yes’