• See a couple sample URLs which are WooCommerce product category pages:

    https://danscartoons.com/cartoon-category/computer
    https://danscartoons.com/cartoon-category/construction

    I have another 63 more similar pages and I added a description for each page which unfortunately does not appear. To make it appear, can I add this:
    ———————————-
    //Display product category descriptions under category image/title on woocommerce shop page */

    add_action( ‘woocommerce_after_subcategory_title’, ‘my_add_cat_description’, 12);
    function my_add_cat_description ($category) {
    $cat_id=$category->term_id;
    $prod_term=get_term($cat_id,’product_cat’);
    $description=$prod_term->description;
    echo ‘<div class=”shop_cat_desc”>’.$description.'</div>’;
    }
    ———————————-

    to “functions.php”? Will the description appear then?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding code to 'functions.php" in order to show category page description’ is closed to new replies.