Kategorien

28. Oktober 2016
[insert_php]$terms = get_terms( ‚product_cat‘ );
// DEBUG
// var_dump( $terms );
echo“

    „;
    foreach( $terms as $term )
    {
    echo“

  • „;
    $thumbnail_id = get_woocommerce_term_meta( $term->term_id, ‚thumbnail_id‘, true );

    // get the image URL
    $image = wp_get_attachment_url( $thumbnail_id );

    // print the IMG HTML
    echo ‚

    ‚. $term->name.‘ (‚.$term->count.‘)

    ‚;
    echo“

  • „;
    }
    echo“

„;

[/insert_php]