From the Codex for pre_get_posts:
pre_get_posts cannot be used to alter the query for Page requests (page templates) because ‘is_page’, ‘is_singular’, ‘pagename’ and other properties (depending if pretty permalinks are used) are already set by the parse_query() method. See: Query Overview. The recommended way to alter the main query for page requests is to use new WP_Query in the page template itself.
So, I’d suggest seeing if new WP_Query ( http://codex.wordpress.org/Class_Reference/WP_Query ) could help you here.
Related Posts:
- How to filter, restrict and return posts based on custom user meta information
- WP_Query and DES sort for Custom Taxonomy based upon a meta field?
- How to add taxonomy filter on the query fly?
- Pagination custom query
- Order by two meta keys
- Finding all results from database within 500 miles of the given latitude and longitude [closed]
- Custom archive page based on array of categories and tags
- Select posts wich has no relationship in custom taxonomy
- Shortcode returns escaped HTML tags
- Calling a custom excerpt function in a local loop
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- Dynamically Override Fancy Title – Part II
- query posts in functions.php and update a field
- tax_query shows no results if nothing is selected
- How to Modify Taxonomy Archive Page with Search Parameter?
- Get array of current post term ID’s
- Display link to taxonomy archive only if it has posts with certain custom field values
- WP_Query, tax_query and term_meta: How to?
- posts_per_page not working
- Exclude admin from WP_Query Contributors
- Multiple Loops Inside a Function
- Function get_queried_object() return NULL in custom taxonomy
- Getting Taxonomy inside WP_Query Loop
- How to delete taxonomy term when a wordpress user is removed?
- Exclude category for main query and custom
- Order posts by taxonomy count
- WP Query using tax_query & meta_query
- WP_Query ignoring tax_query when is_singular
- Having trouble with WooCommerce Storefront child theme single.php “related posts” modification [closed]
- How do I exclude the lowest level terms in a taxonomy?
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- Display most popular in the past two days
- How to display an other custom post type in a different custom post type’s archive?
- Search form not working with custom query?
- Post loop for all taxonomy terms
- New WP_Query calls Pre_get_posts filter twice
- wp_query args adding muitiple tax_querys
- Custom taxonomy.php not working
- WP_Query args to show posts from specific custom taxonomy
- WP_Query for a taxonomy with different taxonomy types
- how to use pre_gets_posts to exclude one queried ID from homepage loop
- Using custom taxonomies in a query
- How to add custom meta to ‘pre_get_terms’?
- get term id from term name
- WP_Query returns different results from get_posts() [closed]
- One WP_Query that always shows 1 post from category X and 1 post from “not in category X”?
- How to load a script code only in posts?
- How to print term name inside wp post loop
- How do I fit WP_Query arguments into a function?
- Create a notification for post field
- Add URL Rewrite Rule To WordPress
- Trying to get property of non-object in: $wp_query
- WordPress dynamic AJAX query
- Custom Taxonomy Breaks Pages
- Foreach loop returning more than one item when querying taxonomy
- wp-query and wp_get_post_terms on custom taxonomy archive page
- Why is my pagination /page/2 taking me to index.php?
- Show X taxonomies of the latest published posts
- How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields
- display ACF repater field in archive page
- Custom Taxonomy – Modify Function to Get Child Category
- Pagination repeating posts on search results
- How to check if logged in user have pending custom post?
- Custom WordPress post query for displaying time-released content on website
- Custom query for custom post type not getting correct post ID
- Query WP Posts, then list the taxonomies from those posts
- How to upload 3 attachments to current post?
- Displaying Pages in Nav Sub-Menu with Specific Taxonomy Terms?
- Global page ID variable empty error
- Taxonomy archive, categorised by other taxonomy, not hiding empty taxonomies
- Optimal way to make tags in tax_query optional?
- WP_Query & shortcode : Return 3 articles from a category WordPress
- My entry results are not consistently alphabetized
- Get post Number with local loop and template
- Save query in function for custom gallery
- Taxonomy Terms That Don’t Exist Display Results
- How to create page that lists tags by initial letter?
- Seach and categories not working when ignoring sticky posts in main loop
- Problem with custom WP_Query and underlying pagination/posts_per_page
- What argument does my function need to echo get_results() query results
- How can I get all the posts that are related with a specific taxonomy term?
- How to combine nested tax_query logic with other nested query logic?
- tax_query not working for taxonomy slug
- Rewrite rule pagination on different url levels
- Select posts wich has no relationship in custom taxonomy
- Custom query for tag and custom tag from 2 post type
- How to get hierarchical number of custom taxanomy
- Declare inline background image in functions.php
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- WP_Query to show post from a category OR custom field – Not 100% answered
- Page displaying 1st post from a range of custom tax?
- WordPress WP_Query Array Custom search via taxonomies
- tax_query not working properly with get_posts
- 1500+ duplicate queries via get_option function (query monitor)
- Custom Taxonomy in custom REST API search
- taxonomy-{term}.php terms pagination returning 404 after a certain page
- Adding a language rule and displaying posts with a custom taxonomy term on its archive page
- WP_Query on custom taxonomy -> Location and Activity
- Include custom post type that matches taxonomy field in another custom post type
- Showing all posts of the current custom taxonomy on archive page