Skip to content

Instantly share code, notes, and snippets.

@dancrumb
Created December 18, 2014 18:34
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 dancrumb/69e7979750ae8aaabbf9 to your computer and use it in GitHub Desktop.
Save dancrumb/69e7979750ae8aaabbf9 to your computer and use it in GitHub Desktop.
<?php
$args = array(
'orderby' => 'display_name',
'who' => 'authors',
'exclude' => '17,10,20,22,6,19' // string
);
$users = get_users($args);
?>
<select name="user" id="user" class="">
<?php
foreach ( $blogusers as $user ) {
echo '<option value="'.$user->username.'">' . esc_html( $user->display_name ) . '</span>'; // I'm not sure if username is right
}
?>
</select>
$('#user').change(function() {
window.location = 'http://www.bond-us.com/blog/author/'+this.value;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment