Skip to content

Instantly share code, notes, and snippets.

@carmolim
Created July 24, 2018 22:51
Show Gist options
  • Save carmolim/6055826cd6d4f25a1e0db6449feeb396 to your computer and use it in GitHub Desktop.
Save carmolim/6055826cd6d4f25a1e0db6449feeb396 to your computer and use it in GitHub Desktop.
Isotope filter - Puxa todos os termos usados de uma taxonomia
<?php $terms = get_terms( 'categoria' ); // taxonomy name ?>
<ul clas="">
<li data-filter="*">Todas</li>
<?php foreach ($terms as $term): ?>
<?php $temp = get_term($term); ?>
<li data-filter=".<?php echo $temp->slug ?>"><?php echo $temp->name ?></li>
<?php endforeach; ?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment