The default search returns all post types, which is what I want. But for one […]
Tag: pre-get-posts
How to get my Custom Post Type to display in Recent Posts using “pre_get_posts”
I created a Custom Post Type (call it “my-post-type”). I created an archive-my-post-type.php page for […]
pre_get_posts : ‘post__not_in’ doesn’t work with global variable
I’m trying to set a post__not_in which use a global $popular variable, defined in the […]
Insert/sticky specific post into Loop at specific location
I’m having a hard time determining the first direction to take with this. I’m trying […]
Force is_search to always TRUE
I’m extending the search functionality by adding custom query vars to the search query object […]
Changing the meta_query of the main query based on custom query_vars and using pre_get_posts
I’ve registered custom rewrite rules and query_vars to use for displaying a list of events […]
pre_get_posts for exclude category
This code works perfectly function exclude_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) […]
Include and Exclude Taxonomies From Archives & Feeds Using ‘pre_get_posts’
What I am trying to do? My blog uses a custom taxonomy called edition with […]
Using database meta_values to calculate new post order using pre_get_posts or a ‘request’ hook
UPDATE: I have worked out my implementation of the selected answer at the bottom of […]
Pre_get_posts Gives 404 on Custom Post Type
I’m trying to filter the query on a sub page called “Ask Question” to list […]
No More Posts Available.
No more pages to load.