Last active
August 29, 2015 14:22
-
-
Save DanielSantoro/00b0bd57e9ad2df28f29 to your computer and use it in GitHub Desktop.
List Taxonomy Terms - Brands
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 | |
| // Add Shortcode | |
| function list_wc_brands_plain() { | |
| // Code | |
| // Show brands in list | |
| $taxonomy = 'product_brand'; | |
| $orderby = 'name'; | |
| $show_count = 0; | |
| $pad_counts = 0; | |
| $hierarchical = 1; | |
| $title = ''; | |
| $args = array( | |
| 'taxonomy' => 'product_brand', | |
| 'orderby' => $orderby, | |
| 'show_count' => $show_count, | |
| 'pad_counts' => $pad_counts, | |
| 'hierarchical' => $hierarchical, | |
| 'title_li' => $title | |
| ); | |
| wp_list_categories ( $args ); | |
| } | |
| add_shortcode( '[list-brands-plain]', 'list_wc_brands_plain' ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment