Support

Account

Home Forums General Issues Adding custom field to product category page Reply To: Adding custom field to product category page

  • Something like this, but the syntax is not correct:

    add_action('woocommerce_shop_loop_item_title', 'custom_pre_title');
    function custom_pre_title(){
    if ((is_product_category() && get_field('product_attribute_1')) {
    	<div class="styling"><?get the_field('product_attribute_1'); ?></div>