Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #28527

    I thought I would create a new thread because my questions go beyond the thread I had originally commented on: http://www.kriesi.at/support/topic/edit-the-archive-page-template

    I would basically like to know how to edit the archive.php file to be able to display taxonomy_product_cat-{category} the same way that the overall shop page displays products.

    I need to do this to add SEO copy to the top of the category pages. Thanks in advance for your help!

    For your reference my site is http://trainingplansonline.com

    #137819

    Actually WooCommerce comes with special “product category” templates and our theme just uses these templates. (i.e. see http://www.kriesi.at/themes/propulsion/shop/ and http://www.kriesi.at/themes/propulsion/product-category/portfolio-theme/ ). It seems like your website uses the standard archive template which shouldn’t be the case.

    To troubleshoot the issue please update WooCommerce to the latest version, update the theme to v2.1 and deactivate ALL third party plugins except WooCommerce. Afterwards the right product archive template should be used and you can activate the third party plugins one by one to find the culprit.

    #137820

    Hi Dude,

    I have everything completely up to date and the product category pages are working just fine: http://trainingplansonline.com/shop/training-videos/

    What I would like to know is how to edit the specific category to add content above the product listings..Normally, the edit would be to create a file such as taxonomy_product_cat-{category} but this seems to revert to the wrong loop or something.

    Am I copying the wrong archives file? Should I be copying it from the woocommerce files?

    #137821

    Actually the product templates support the category “description” field. Go to Products > Categories and click on a category to edit it. Then insert some content into the “Description” field and WooCommerce will display it at the top above the product grid.

    #137822

    Thanks dude, appreciate it. I see it now. It seems to be going right under the header instead of the main body page. Is that a WooCommerce edit I need to make or is that because of the theme? Please see the following: http://trainingplansonline.com/product-type/season-plans/

    If it is the theme then I would say it needs a styling update in the next version because I’m going to need to do a number of CSS fixes to this.

    Thanks again for your help!

    #137823

    Yes, you’re right and we’ll fix this in the next theme update. For now you can fix it by modifying wp-contentthemespropulsionconfig-woocommerceconfig.php. Open up the file and replace

    function avia_woocommerce_before_shop_loop()
    {

    global $avia_config;

    if(isset($avia_config['dynamic_template'])) return;

    ob_start();
    if (!empty($avia_config['overview'])) echo "</div>"; // end title_container
    echo "<div class='template-shop content ".$avia_config['content_class']." units'>";

    $content = ob_get_clean();
    echo $content;
    ob_start();
    }

    with

    function avia_woocommerce_before_shop_loop()
    {

    global $avia_config;

    if(isset($avia_config['dynamic_template'])) return;

    ob_start();
    if (!empty($avia_config['overview'])) echo "</div>"; // end title_container
    echo "<div class='template-shop content ".$avia_config['content_class']." units'>";
    woocommerce_taxonomy_archive_description();
    woocommerce_product_archive_description();
    $content = ob_get_clean();
    echo $content;
    ob_start();
    }

    and at the very bottom of the file insert

    remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
    remove_action( 'woocommerce_archive_description', 'woocommerce_product_archive_description', 10 );

    #137824

    Awesome, works perfectly thanks Dude! This should really help the SEO of my store!

    For anyone else’s reference, HTML tags like links etc work in this description. An easy way to compile the description the way you want it is to write it in a standard post editor under “visual” and then copy the “text” version (with tags such as and

      etc) into the description.

    Thanks again Duuuude!!

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Custom Taxonomies’ is closed to new replies.