Created
April 29, 2014 17:18
-
-
Save richtabor/11406583 to your computer and use it in GitHub Desktop.
Fix for adding "-" in lieu of spaces for categories with multiple words
This file contains hidden or 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
<li class="isotope-item filter <?php if ( $terms && !is_wp_error( $terms ) ) { foreach ( $terms as $term ) { $cat = strtolower($term->name);$id = preg_replace('/[^a-zA-Z]+/', '-', $cat);echo $id; echo ' ';} } ?>"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment