WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
How to add this code..... (1 post)

  1. WAPPUK
    Member
    Posted 4 months ago #

    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/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags