Skip to content

Instantly share code, notes, and snippets.

@JiveDig
Created May 10, 2013 19:41
Show Gist options
  • Save JiveDig/5556866 to your computer and use it in GitHub Desktop.
Save JiveDig/5556866 to your computer and use it in GitHub Desktop.
// Add Video category sort
add_action( 'genesis_before_loop', 'jivedig_video_category_sort' );
function jivedig_video_category_sort() {
echo '<h1>Video Showcase</h1>';
$terms = get_terms('video_cat');
echo '<div class="video_cat-sort">';
echo '<div class="all-videos"><a href="/videos/">« ALL VIDEOS</a></div>';
foreach ($terms as $term) {
echo '<a href="'.get_term_link($term->slug, 'video_cat').'">'.$term->name.'</a>';
}
echo '</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment