Last active
October 26, 2017 23:32
-
-
Save danielpowney/a14179d7427735e806e1e5b89707543d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* If pretty permalinks are turned on, we need to make the following query string variables | |
* available to WP_Query to sort by highest rated posts | |
*/ | |
function my_query_vars( $qvars ) { | |
$qvars[] = 'orderby'; | |
$qvars[] = 'meta_key'; | |
$qvars[] = 'order'; | |
$qvars[] = 'ignore_sticky_posts'; | |
return $qvars; | |
} | |
add_filter( 'query_vars', 'my_query_vars' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment