Tagged: x
-
AuthorPosts
-
July 18, 2016 at 5:59 pm #1092556
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!
July 19, 2016 at 1:32 am #1093001Hi 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.
July 19, 2016 at 11:36 am #1093806Hi sorry, wrong link! This is it: http://www.amytwon.com/product-category/journey-tapestries/
July 19, 2016 at 12:18 pm #1093883Hi 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!July 19, 2016 at 2:18 pm #1094046Hi 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 | AdventuresDoes that help?
Thanks!July 19, 2016 at 11:24 pm #1094729Hi 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.
July 20, 2016 at 5:15 pm #1096008Thank you this worked perfectly!!
July 20, 2016 at 7:02 pm #1096092Happy to hear that.
Feel free to ask us again.
Thanks.
-
AuthorPosts