Skip to content

Instantly share code, notes, and snippets.

@kraftbj
Created October 6, 2015 20:24
Show Gist options
  • Save kraftbj/d433293a2d9fb7679bd1 to your computer and use it in GitHub Desktop.
Save kraftbj/d433293a2d9fb7679bd1 to your computer and use it in GitHub Desktop.
Add a random number for cache busting
<?php //remove this line if adding to an existing php file.
add_filter( 'resume_manager_get_resumes', 'bk_random_query_wpjm', 10, 2);
function bk_random_query_wpjm( $query_args, $args ){
if ( $query_args['orderby'] = 'rand' ) {
$query_args['rand_arg'] = wp_rand();
}
return $query_args;
}
apply_filters( 'resume_manager_get_resumes', $query_args, $args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment