As @Milo pointed out in the comments above, custom post types and taxonomies are registered on init, so this would seem to be the earliest hook available that is guaranteed to work for all content.
Related Posts:
- Is it possible to completely stop WP_Query retrieving posts?
- Hook/action after WP_Query gets posts to query custom tables for post-related meta
- Want to redirect if search query match exact title of any post
- Overriding The Loop with filter or hook
- Identify which loop you are hooking into; primary or secondary?
- Best practice custom function, where to echo the variables?
- How to change posts order on Category and Tag archives?
- is_search was called incorrectly
- How to choose between hooking into per_get_posts or into parse_query
- How to use filter hook “the_posts” with a function that refers to $this?
- How to delete taxonomy term when a wordpress user is removed?
- How to filter, restrict and return posts based on custom user meta information
- How to use the query hook/filter?
- Set global $wp_query/$post variable for dynamic page generation
- How can I override one post and make it display content for another post?
- queried_object using pre_get_posts gets notices and warning
- Utilising an existing page while using the “s” query parameter
- Elementor posts custom query based on tag [closed]
- WP_Query retuning empty array in rest api
- SEARCH QUERY PLEASE HELP | call_user_func_array() expects parameter 1 to be a valid callback php
- remove_action – pre_get_posts – does not restore original query
- Rewrite rule pagination on different url levels
- $wp_query when new WP_Query
- How to short circuit a wordpress query that is not related to posts?
- How to choose between hooking into pre_get_posts or into parse_query
- When to use WP_query(), query_posts() and pre_get_posts
- How to get an array of post data from wp_query result?
- How to only display posts whose meta_value field is not empty?
- How to print the excuted sql right after its execution
- WordPress Pagination Not Working – Always Showing First Pages Content
- WP query taxonomy input differs to output?
- How to add taxonomy filter on the query fly?
- Pagination returns 404 after page 20
- Make a WP Query search match exactly the search term
- Query WooCommerce orders where meta data does not exist
- How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
- What exactly does the ‘s’ parameter search for in WP queries?
- WP_Query min and max values
- post_type is ignored by WP_Query when ‘tag’ argument is included
- Is ‘no_found_rows’ a silver bullet for WP_Query optimization when getting all posts of a certain type?
- Can I specify post__in for one particular post type in the query?
- querying with custom meta field with meta_query
- Order by two meta keys
- multiple meta key but get server load is very high
- A WP_Query that will look for posts after 2 weeks ago OR with a certain meta value
- Ignore a filter on the media library
- Multiple orderby parameters in pre_get_posts() action
- Merge 2 args in one WP_Query and order it by date
- if wp_query taxonomy term have posts
- Pagination broken when merging search results with additional WP_Query
- Select posts wich has no relationship in custom taxonomy
- How to display posts from multiple post type in random order in wordpress?
- Multiple keyword search
- WP-PageNavi gives me a 404 when using WP Query
- How to bring specific post to front of wordpress loop?
- How can i get the last post from wp multisite?
- WP_Query, custom sort and custom filter
- How to wp_query posts with ajax
- post thumb nail
- Filter by title content and meta key at the same time
- Use meta_query to display events by date in custom field
- Calling WP_Query with the same args in two different places produces two different results
- Sticky Post default functionality with WP_Query is ignored when using AJAX
- tax_query OR with empty result returns all posts
- WP_Query Order by Specific Post ID First
- Custom Query – show first post twice?
- Next/Prev posts on same page
- What is considered a default query for the request filter?
- Using one WP_Query object within the loop of another WP_Query object
- How to find exact match for search term in WP_Query? What is the additional string added in LIKE query in WP_Query?
- Improve wp query perfomance on large db
- If two first numbers exist in wp_meta_query value
- Two different conditions with a single WP_Query
- Order by slug in get_terms with multiple taxonomies
- Creating query to show which editor (classic or block) was last used to edit a post/page
- Tax query clause inside a meta query clause?
- Is there any advantage of using default WordPress Search instead of creating a custom one?
- Search pages that are a child of the current page
- How to access WP database inside ipn.php? [duplicate]
- is_tax() function not working as expected
- Getting the current post number / make posts increment
- Optional Meta Query
- Set conditional on template based on referring page slug
- Multiple If Else with WP Query in WordPress
- Serve specific “template” page at any URL that ends in its slug
- WordPress search posts by author name with autocomplete
- WordPress pagination not working using WP_Query
- Meta_query on same meta key, with diffrenct values
- Can we return all category (not post) with Custom Query Filter? [closed]
- WP Query using tax_query & meta_query
- posts_per_page not working for first page of pagination
- WP_Query – Exclude Posts
- How to control a common terms list from one place?
- Advanced ordering of query_posts
- Add class to first post in custom loop using post_class filter
- Exclude Category filter from Portfolio section
- echo a specific meta_key queried through a custom post
- WP_Query with meta_query dosen’t return results
- Get latest post revision with wp-query
- date_query seems to be ignored by wp_query