Remove Last Breadcrumb Link (Current Page)

I have breadcrumbs active on my site. Wondering how to remove the link from the current page in the breadcrumbs but still keep it shown, as it is unnecessary.

For example, the current page is “Product 1” and the breadcrumb is “Home (Hyperlink) > Category (Hyperlink) > Product 1 (Hyperlink)”.

I would like to achieve: “Home (Hyperlink) > Category (Hyperlink) > Product 1 (NOT Hyperlinked)”

Any help would be appreciated!

Hello There,

Thanks for writing in!

To remove the last link or disable the link in the last breadcrumb link, please add the following CSS code in the X > Theme Options > Global CSS (http://prntscr.com/evui3r)

.x-breadcrumbs .current {
    pointer-events: none;
}

To add category in your product breadcrumb, please check out this thread: https://theme.co/apex/forum/t/breadcrumbs-adding-category-and-blog-page-home-plus-more/27961/2

Hope this helps. Please let us know how it goes.

Hello!

Thanks for the response. I am still seeing an a href in the html. Is it possible to remove this via the functions file?

Hi @prodsans,

You mean just to make standard text instead of a link when viewed in the browser? Or does it need to be applied on the source code too?

If it just needs to be applied in browser view and wishes to make it a plain text, then please add this code to your global custom javascript.

jQuery('.x-breadcrumbs .current').replaceWith( jQuery('.x-breadcrumbs .current').text() );

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.