Support

Account

Home Forums Front-end Issues Add category description with Advanced Custom Field Reply To: Add category description with Advanced Custom Field

  • I have copied content-product_cat.php to my theme Woocommerce folder and tried this answer

    /**
    	 * woocommerce_after_subcategory hook.
    	 *
    	 * @hooked woocommerce_template_loop_category_link_close - 10
    	 */
    	do_action( 'woocommerce_after_subcategory', $category ); ?>
    
    <?php 
     $queried_object = get_queried_object(); 
    $taxonomy = $queried_object->taxonomy;
    $term_id = $queried_object->term_id;  
     
    $thumbnail = get_field('productdesc', $queried_object);
     
    $thumbnail = get_field('productdesc', $taxonomy . '_' . $term_id);
    
    ?>    
    
    <?php the_field( 'productdesc', $queried_object ); ?>

    But it doesnt help. Any help please!