I’m not sure exactly what’s happening, but I can guess based on a few context clues. That particular function is parse_tax_query
. It appears to be checking if the taxonomy is hierarchical, I assume it’s expecting a string that could possibly be a parent/child path of terms, so it uses basename to get the actual term queried- the next line is $term = $q[$t->query_var];
Related Posts:
- WordPress 4.9.5 PHP intermittent warning trim() expects parameter 1 to be string, array given
- Undefined property: WP_Query::$post
- Error: Attempt to read property “ID” on null
- WP_Query orderby date not working
- Best way to detect if you are in a SINGLE POST page
- Better way to get tag stats?
- Query two taxonomies via URL or link?
- wp_query order by title
- How to count post type that has a particular term?
- Group posts by meta_key
- How to Get All Posts but the Private ones?
- How can I hide posts that are over 2 years old
- WordPress custom search form with pre_get_posts not work
- Custom URl parameter
- order by multiple meta keys in pre_get_posts
- Order By Multiple Meta Fields
- WordPress: Keep order of query_posts list of post ID’s using post__in
- How to get user_id from wordpress database inside ajax function?
- How to combine meta_query and post__in in WP_Query
- Is it faster to query records using $wpdb instead of Wp_Query?
- query user display_name failed in a custom mysql query foreach
- Query with custom taxonomy not working
- Query posts by specific word on title
- Date and Category query with filter
- Get posts for which a custom field is not present, with get_posts
- Output an array of terms for a ‘tax_query’ => array()
- add active class based on permalink and url
- Search by post id in a specific page then auto-redirect to searched post
- Pretty urls for custom pagination
- WP_Query with ‘rand’, but equal number of posts from the taxonomy terms given
- querying data via $wpdb and get_row
- slow query – Search for Media Gallery
- WordPress has a list of reserved words, can I override them, to use one in a query string?
- WP_Query arguments order
- meta_query: check if number exists
- How to order WP_Query to group results?
- new WP_Query messes up pagination
- Search Page Returns Nothing
- WP Query causing timeout
- get term id from term name
- Query where ANDing slug values not working
- Woo Commerce using WP_Query to get products that match price range, with an additional required product attribute
- Retrieve select tag custom values from array and display them in current page with wp_query?
- How to use a dropdown to filter posts by custom field
- Use title of post as argument for query
- Content not displaying on paginated page
- Different Loop for tag pages?
- show custom category posts from a custom post type
- how to load posts to a custom post template after using template_redirect or template_include
- 2 queries with counters
- Orderby two meta fields not working
- Multiple Query_Posts
- WP_Query: attachment image in “full” size?
- Adding pagination to sub-wp_query within a singular post page
- Page template doesn’t display simple HTML if inserted into other page?
- How to add date_query to meta_query array
- Order by the first array within a meta_query
- Multiple nested meta queries
- How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields
- Make a products only viewable to a specific user ID in meta_query pre_get_posts
- get_post_format is not returning standard
- Duplice post with standard WP loop – fixed by using query_posts() instead
- Get categories within specific term
- Custom query for custom post type not getting correct post ID
- How to merge these two post queries?
- Exclude parent categories from recent posts list
- How can I query a radius of coordinates?
- custom excerpt is not being shown
- Filtering WP_Query based on wp_postmeta keys values
- WP_Query: Query posts only if their access is restricted to logged user’s role
- Get specific value from variable to use in query
- WP_Query with meta_query won’t orderby
- Adding Category in WP_Query Not Working
- meta_query only check if both value are set
- post_type not working when tag__in is present?
- display all posts from category with and without terms in chronological order
- How to create page that lists tags by initial letter?
- Seach and categories not working when ignoring sticky posts in main loop
- posts_per_page increment additional post
- WordPress: Cron locking and Queue
- Correct Way To Run Multiple Queries Sharing Some Base Data
- how to query for meta_value have array
- How to make the default WordPress search return borader results
- WP_Query shows all posts on single post pages
- Display Count of posts
- Optimize WP_Query
- Add a custom variable to query page object
- Show sticky post before other WP_Query
- List ALL posts within last week from current category on category page
- WP_Query on “property” in the options table
- Dynamically name array in WordPress loop – add/get values
- Read more redirection problem
- Creating Custom Query
- Help in query for list links
- WP_Query issues with argument posts_per_page
- Search (Custom Form, Custom Search Result)
- Hook to get the query result after listing posts
- Elementor custom query
- How do I have multiple metaqueries inside one wordpress query
- Can I use WP_Query to find a post with a particular menu_order?