Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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!

    #322792

    Hey!

    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!
    Josue

    #323199

    Thanks 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”

    #323311

    Hey!

    Does it get fixed if you remove the code? try putting it in /themes/enfold/functions.php.

    Regards,
    Josue

    #323327

    I just removed the code from the functions file (I had it in the /themes/enfold/functions.php file) and the error is now gone.

    #323344

    Try 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!
    Josue

    #323920

    Thanks 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'),

    #323943

    Hi!

    Discard the code in functions.php, put this code in Quick CSS instead:

    .single-product .avia-post-nav{
    display: none;
    }

    Cheers!
    Josue

    #323961

    Thanks. That did the trick.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Woocommerce breadcrumbs & previous/next’ is closed to new replies.