Support » Plugin: WooCommerce » How to add this code…..

  • WAPPUK

    (@wappuk)


    I need to add these two bits of code into the category template:in order for this plug in to work…

    http://wordpress.org/plugins/categorytinymce/

    ———————————————————————————–
    You can now add a second category description at the bottom of the category listing. You need to add the following code to the category template file to get the description to display:

    <div class=”botdesc”>
    <?php
    if ( is_category() ) {

    $cat_id = get_query_var(‘cat’);
    $cat_data = get_option(“category_$cat_id”);
    if (isset($cat_data[‘bottomdescription’])){
    echo do_shortcode($cat_data[‘bottomdescription’]);
    }
    }

    ?>
    </div>

    ———————————————————————————-

    you can also set a category image and this is called in your template by:

    <div class=”category_image”>
    <?php
    $cat_id = get_query_var(‘cat’);
    $cat_data = get_option(“category_$cat_id”);
    if (isset($cat_data[‘img’])){
    echo ‘‘;
    }
    ?>
    </div>

    Thanks

    Dean

    https://wordpress.org/plugins/woocommerce/

  • The topic ‘How to add this code…..’ is closed to new replies.