From 5d21cded2b2ca80eead4fbd67852644052ed7404 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Sat, 27 May 2017 20:10:56 -0400 Subject: [PATCH] Only disable main query for non-admin Otherwise admin listing will return empty set #fix --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 3378d7fd7..749872f11 100644 --- a/functions.php +++ b/functions.php @@ -363,7 +363,7 @@ function dones_register_custom_types() { * @return string|bool $request The complete SQL query, or false if main query */ function dones_disable_main_query( $request, $query ) { - if ( $query->is_main_query() ) { + if ( $query->is_main_query() && ! is_admin() ) { return false; }