Created
November 26, 2020 07:35
-
-
Save wpflames/10b5aba1bf30427fd7605b2e32854982 to your computer and use it in GitHub Desktop.
How to list Custom Post Type's Taxonomies
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
| <?php | |
| if( $terms = get_terms( array( | |
| 'taxonomy' => 'YOUR_TAXONOMY', | |
| 'orderby' => 'name' | |
| ) ) ) : ?> | |
| <ul class="faq-filter"> | |
| <li><a href="">All</a></li> | |
| <?php foreach ( $terms as $term ) : ?> | |
| <li><a id="faq-filter-id-<?php echo $term->term_id; ?>" href=""><?php echo $term->name; ?></a></li> | |
| <?php endforeach; ?> | |
| </ul> | |
| <?php endif; | |
| ?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment