-
AuthorPosts
-
September 18, 2014 at 9:06 pm #321488
Is it possible to hide the shop page and category page from the breadcrumbs? I’d like the breadcrumbs to just be Home / Product Name instead of the extra pages and categories.
http://www.johnstoncompanies.com/product/3m-performance-masking-tape-yellow-301/
Also, is it possible to remove the Previous and Next Item Links that appear on the left and right side of the screen only from Woocommerce? I like them displayed in the blog section, but not in the Woocommerce section.
Thanks!
September 22, 2014 at 5:46 am #322792Hey!
Try adding this at the very end of your theme / child theme functions.php file:
function disable_nav_on_products() { if(is_singular('product')){ add_filter('avia_post_nav_entries', '__return_false'); } } add_filter('wp_head', 'disable_nav_on_products');
Regarding the breadcrumbs, try adding this to Quick CSS:
.breadcrumb-trail span, .breadcrumb-trail span.sep{ display: none; } .breadcrumb-trail span:nth-child(1), .breadcrumb-trail span:nth-child(2), .breadcrumb-trail span:nth-child(3), .breadcrumb-trail span:last-child { display: inline; }
Cheers!
JosueSeptember 22, 2014 at 6:07 pm #323199Thanks for your help. The breadcrumbs worked well; however, after applying the change to the functions file, I’m now receiving an error. The previous/next are gone, but the error is now showing up. I had not appeared prior to adding this to the functions.
Here’s a url where the error is appearing (at the bottom of the page, below the footer).
http://www.johnstoncompanies.com/product/3m-value-masking-tape-101/It shows the error on line 347, but the new entry was placed on lines 574-580. It appears that line 347 is in the section titled “Activate native wordpress navigation menu and register a menu location”
September 22, 2014 at 9:53 pm #323311Hey!
Does it get fixed if you remove the code? try putting it in /themes/enfold/functions.php.
Regards,
JosueSeptember 22, 2014 at 10:32 pm #323327I just removed the code from the functions file (I had it in the /themes/enfold/functions.php file) and the error is now gone.
September 22, 2014 at 11:27 pm #323344Try with this code instead:
function disable_nav_on_products() { if(is_singular('product')){ add_filter('avia_post_nav_entries', '__return_false'); } } add_action('get_header', 'disable_nav_on_products');
Cheers!
JosueSeptember 23, 2014 at 9:36 pm #323920Thanks for your help. Unfortunately, it is still creating an error. This time on line 370.
Line 370 appears to be…
'html' => __('Footer Menu <br/><small>(no dropdowns)</small>', 'avia_framework'),
September 23, 2014 at 10:34 pm #323943Hi!
Discard the code in functions.php, put this code in Quick CSS instead:
.single-product .avia-post-nav{ display: none; }
Cheers!
JosueSeptember 23, 2014 at 11:33 pm #323961Thanks. That did the trick.
-
AuthorPosts
- The topic ‘Woocommerce breadcrumbs & previous/next’ is closed to new replies.