Created
July 24, 2018 22:51
-
-
Save carmolim/6055826cd6d4f25a1e0db6449feeb396 to your computer and use it in GitHub Desktop.
Isotope filter - Puxa todos os termos usados de uma taxonomia
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 $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