Forked from hirejordansmith/add-cart-to-wordpress-menu.php
Last active
August 29, 2015 14:22
-
-
Save mdunbavan/25962cfcf85743e8b543 to your computer and use it in GitHub Desktop.
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_action('woocommerce_single_product_summary', 'hjs_add_brand_by_link', 5); | |
| function hjs_add_brand_by_link() { | |
| global $post; | |
| $post_id = $post->ID; | |
| $terms = get_the_terms($post_id, 'product_brand' ); | |
| foreach ($terms as $term) { ?> | |
| <span class="brand-by-link">by <a href="<?php echo get_term_link( $term, 'product_brand' ); ?>"><?php echo $term->name; ?></a></span> | |
| <?php } | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment