Created
June 15, 2017 05:51
-
-
Save shangdev/59c06e9ed5dba8f0ebe3f70b4c65ad60 to your computer and use it in GitHub Desktop.
根据term_id获取分类缩略图thumb
This file contains 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
$thumbnail_id = get_woocommerce_term_meta($item->term_id, 'thumbnail_id', true); | |
$thumb = wp_get_attachment_url($thumbnail_id); | |
echo '<img src="'. $thumb .'" alt="'. $title .'">'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment