Skip to content

Commit

Permalink
Only disable main query for non-admin
Browse files Browse the repository at this point in the history
Otherwise admin listing will return empty set

#fix
  • Loading branch information
aduth committed May 28, 2017
1 parent 468a117 commit 5d21cde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5d21cde

Please sign in to comment.