This is how I am currently trying:
$taxonomies = array(
'product_cat'
);
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => false,
'exclude' => array(),
'exclude_tree' => array(),
'include' => array(),
'number' => '',
'fields' => 'all',
'slug' => '',
'parent' => '',
'hierarchical' => true,
'child_of' => 0,
'childless' => false,
'get' => '',
'name__like' => '',
'description__like' => '',
'pad_counts' => false,
'offset' => '',
'search' => '',
'cache_domain' => 'core'
);
$terms = get_terms($taxonomies, $args);
$print_terms = 0;
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
foreach ( $terms as $term ) {
$term_img = wp_get_attachment_url( get_post_thumbnail_id($term->term_id) );
var_dump($term_img); /* Allways Bool(false) */
So question is,
Do you know what am I doing wrong?