Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1092556

    rotipom
    Participant

    Hi I’d like to add a menu shortcode (or any other way to add a secondary nav menu) that is similar to the one on the main shop page here (where it says all | originals | etc) http://www.amytwon.com/shop/ so that there is nav here in the Product Category Page http://www.amytwon.com/product/a-tale-of-two-owls/ .

    I’m assuming I’ll need to modify the WooCommerce Category Template somehow but would love some guidance on an easy way just to add a secondary nav menu. Thanks!

    #1093001

    Lely
    Moderator

    Hi There,

    Upon checking, this page:http://www.amytwon.com/product/a-tale-of-two-owls/ is a single product page and not a category page. Please clarify where you really want to add the another menu. Single product page or Category page? Then point us exactly on where you want it so we can be specific on our suggestion.

    #1093806

    rotipom
    Participant
    #1093883

    Rahul
    Moderator

    Hi There,
    Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you’re trying to do.
    If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do. We’ll be happy to provide you with a response once we have a better understanding of the situation.
    Cheers!

    #1094046

    rotipom
    Participant

    Hi Rahul, on this category page http://www.amytwon.com/product-category/journey-tapestries/ there is no way to get back to the main SHOP page, so I want to add the same (secondary) shop menu that is on the SHOP page (see below) to bring people back to the main shop page.

    The shop nav menu I want to add to the category page above is this one : http://www.amytwon.com/shop/ , right above the thumbnails :
    All | Originals | Journey Prints & Kits | Adventures

    Does that help?
    Thanks!

    #1094729

    Lely
    Moderator

    Hi There,

    Thank you for the clarification.
    To this, please copy this file :\wp-content\themes\x\woocommerce\loop\loop-start.php on your child theme: \wp-content\themes\x-child\woocommerce\loop-start.php . Open the copied file and insert this code:

    <?php
       if(x_is_product_category()){
     echo do_shortcode('Place your menu shortcode here');
     }
     ?>

    After this line:
    <?php $column_class = ( is_shop() || is_product_category() || is_product_tag() ) ? ' cols-' . $columns : ''; ?>

    Final code should be like this:

    <?php
    
    // =============================================================================
    // WOOCOMMERCE/LOOP/LOOP-START.PHP
    // -----------------------------------------------------------------------------
    // @version 2.0.0
    // =============================================================================
    
    ?>
    
    <?php $columns      = x_get_option( 'x_woocommerce_shop_columns' ); ?>
    <?php $column_class = ( is_shop() || is_product_category() || is_product_tag() ) ? ' cols-' . $columns : ''; ?>
    <?php
       if(x_is_product_category()){
     echo do_shortcode('[custom_headline type="left" level="h2" looks_like="h3" accent="true"]zxzxCustom Headline[/custom_headline]');
     }
     ?>
    <ul class="products<?php echo $column_class; ?> yeng">

    Further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding.

    #1096008

    rotipom
    Participant

    Thank you this worked perfectly!!

    #1096092

    Nico
    Moderator

    Happy to hear that.

    Feel free to ask us again.

    Thanks.