Skip to content

Instantly share code, notes, and snippets.

@sbbnm
sbbnm / content-isotope.php
Last active August 29, 2015 14:10
isotope ....
<ul id="filters">
<li><a href="#" data-filter="*">Everything</a></li>
<?php
$terms = get_terms("category"); // get all categories, but you can use any taxonomy
$count = count($terms); //How many are they?
if ( $count > 0 ){ //If there are more than 0 terms
foreach ( $terms as $term ) { //for each term:
echo "<li><a href='#' data-filter='.".$term->slug."'>" . $term->name . "</a></li>\n";