Created
September 19, 2015 02:24
-
-
Save rali14/493e7cf9ef18b5704f20 to your computer and use it in GitHub Desktop.
Order Listings Randomly
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
function custom_orderby( $query_args ) { | |
$query_args[ 'orderby' ] = 'title'; | |
$query_args[ 'order' ] = 'ASC'; | |
return $query_args; | |
} | |
add_filter( 'job_manager_get_listings_args', 'custom_orderby', 99 ); | |
function custom_orderby_cache( $query_args ) { | |
$query_args[ 'cache-bust' ] = time(); | |
return $query_args; | |
} | |
add_filter( 'get_job_listings_query_args', 'custom_orderby_cache', 99 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment