Created
October 6, 2015 20:24
-
-
Save kraftbj/d433293a2d9fb7679bd1 to your computer and use it in GitHub Desktop.
Add a random number for cache busting
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 //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