I’ve got a special “position” meta field for posts which can be between 0 and […]
Tag: pre-get-posts
Getting the different post statuses + count like in edit.php, in a custom submenu page
I’m trying to create a submenu page for reordering posts/pages. Right now I’m trying to […]
$query->query_var[‘post_type’] not set for pages
Bulding off of this response from @kaiser about being able to filter by post types […]
Showing posts from different categories and from custom post type
On my main page, I want to show posts from 3 categories, and 1 custom […]
How to target the default Recent Posts and Recent Comments widgets with pre_get_posts?
I added the following to my functions.php: add_action(‘pre_get_posts’, ‘keyl_get_emp_posts’); function keyl_get_emp_posts($query) { if ($query->is_main_query()) $query->set(‘post_type’, […]
Custom search filter causes menu and query_posts problems
I’m using a custom search filter (using my custom query var type), like so: function […]
Custom post type search using $_SESSION and pre_get_posts
I’ve been hacking all day at a custom post type search/filter system. So far I […]
Adding meta_key via pre_get_posts causes navigation to disappear
I’m writing a custom function that allows the posts to be sorted based on a […]
Using pre_get_posts with WP_Query
I was reading Stephen Harris‘s excellent answer to this question regarding the use of WP_query(), […]
Media library to list images only user uploaded
I want to list images for only user uploaded image. Here is the scenario: Using […]
No More Posts Available.
No more pages to load.