Support

Account

Home Forums General Issues WooCommerce Display Product Category field in the loop Reply To: WooCommerce Display Product Category field in the loop

  • Almost, it put me in the right direction

    // Category Extra Title Description in Archives
    add_action( ‘woocommerce_after_subcategory_title’, ‘custom_add_product_extratitle’, 12);

    function custom_add_product_extratitle ($category) {
    $cat_id = $category->term_id;
    $prod_term = get_term($cat_id,’product_cat’);
    $term = get_field(‘alternative_title’);
    $othertitle = get_field(‘alternative_title’, ‘term_’.$prod_term->term_id);

    // retrieve the existing value(s) for this meta field.

    echo ‘<div class=”extratext”><h2>’.$othertitle.'</h2></div>’;

    }