Skip to content

Instantly share code, notes, and snippets.

@raideus
Created November 1, 2013 17:38
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 raideus/7268972 to your computer and use it in GitHub Desktop.
Save raideus/7268972 to your computer and use it in GitHub Desktop.
<?php
$args = array(
'orderby' => 'name',
'hide_emppty' => 1,
'hierarchical' => false,
'taxonomy' => 'gs_topics'
);
$topics = get_terms($args);
foreach ($topics as $topic) :
if (have_posts()) : while (have_posts()) : the_post();
if (has_term($topic, 'gs_topics')) :
// show the resource
endif;
endwhile; endif;
endforeach;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment