Skip to content

Instantly share code, notes, and snippets.

@marcosnakamine
Last active March 10, 2017 13:18
Show Gist options
  • Save marcosnakamine/31b64b923da0b9ac3be08994f91ceaf9 to your computer and use it in GitHub Desktop.
Save marcosnakamine/31b64b923da0b9ac3be08994f91ceaf9 to your computer and use it in GitHub Desktop.
WooCommerce - Get product tags, image and permalink with ACF
<?php
$cat = get_categories( array(
'taxonomy' => 'product_tag'
) );
foreach( $cat as $key => $value ){
var_dump( get_field( 'imagem', 'product_tag_'.$value->term_id ) );
echo get_term_link( $value->term_id, 'product_tag' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment