Skip to content

Instantly share code, notes, and snippets.

@rali14
Created September 19, 2015 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rali14/493e7cf9ef18b5704f20 to your computer and use it in GitHub Desktop.
Save rali14/493e7cf9ef18b5704f20 to your computer and use it in GitHub Desktop.
Order Listings Randomly
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