Post by kia » Fri Feb 17, 2017 7:36 pm

Hello, I want to remove either whole breadcrumbs from all pages on my OpenCart 2 store, or remove the last part of breadcrumbs. How can I do that? Last part in a breadcrumbs has link to the same page itself where you are. This is a SEO issue.

Thanks for any advice.

kia
New member

Posts

Joined
Fri Feb 17, 2017 7:23 pm

Post by uksitebuilder » Sat Feb 18, 2017 1:26 am

What appears to be the issue ?

I say this because if you really want to remove the breadcrumbs, you will have to edit most of the .tpl template files

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by kia » Sat Feb 18, 2017 2:23 am

uksitebuilder wrote:
Sat Feb 18, 2017 1:26 am
What appears to be the issue ?

I say this because if you really want to remove the breadcrumbs, you will have to edit most of the .tpl template files
I don't think that breadcrumbs is usefull. They will cause extra internal links which can lead to bad SEO, if your page has too many internal links. The last part has link to itself. I've read that it isn't healthy for SEO. Rather I want to remove whole breadcrumbs from all sites, or at least removing last part of trailer in breadcrumbs. I can start with category and product pages. How can I do removing last part or whole trailer of breadcrumbs?

kia
New member

Posts

Joined
Fri Feb 17, 2017 7:23 pm

Post by uksitebuilder » Sat Feb 18, 2017 2:57 am

To remove all breadcrumbs

edit the appropriate tpl file and delete

Code: Select all

  <ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by kia » Sat Feb 18, 2017 8:21 am

uksitebuilder wrote:
Sat Feb 18, 2017 2:57 am
To remove all breadcrumbs

edit the appropriate tpl file and delete

Code: Select all

  <ul class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>
It works. Removing this code from tpl files will remove whole breadcrumbs. How can I remove only the last part of breadcrumbs trailer?

kia
New member

Posts

Joined
Fri Feb 17, 2017 7:23 pm

Post by uksitebuilder » Sat Feb 18, 2017 4:55 pm

You can try with this instead:

Code: Select all

  <ul class="breadcrumb">
    <?php array_pop($breadcrumbs); foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by rgbworld » Sun Feb 19, 2017 2:03 am

You could remove the breadcrumb via CSS by adding

Code: Select all

display:none
File: catalog/view/theme/default/stylesheet/stylesheet.css

Code: Select all

/* breadcrumb */
.breadcrumb {
	margin: 0 0 20px 0;
	padding: 8px 0;
	border: 1px solid #ddd;
	display:none;
}

RGB World - FREE and Commercial Extensions
For custom work or support, please use our Contact Form or visit our Support Forum.

Favorite Quote: There are 10 types of people in the world. Those who understand binary and those who don't. 8)


User avatar
New member

Posts

Joined
Wed Aug 08, 2012 6:11 am

Post by uksitebuilder » Sun Feb 19, 2017 2:33 am

Always best to remove code you don’t want.

display:none can still be read by the major search engines and also adds to the overhead, albeit only a small amount in this instance.

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by kia » Sun Feb 19, 2017 3:04 am

rgbworld wrote:
Sun Feb 19, 2017 2:03 am
You could remove the breadcrumb via CSS by adding

Code: Select all

display:none
File: catalog/view/theme/default/stylesheet/stylesheet.css

Code: Select all

/* breadcrumb */
.breadcrumb {
	margin: 0 0 20px 0;
	padding: 8px 0;
	border: 1px solid #ddd;
	display:none;
}
This will lead to seriously SEO issue, if you hide some text and links. Google will hate that, because it thinks that you want to trick users.

kia
New member

Posts

Joined
Fri Feb 17, 2017 7:23 pm

Post by rgbworld » Sun Feb 19, 2017 5:27 am

I stand corrected. @uksitebuilder has the best answer to OP.

I did review the SEO concerns regarding the use of display:none. Google and other search engines will give hidden content way less ranking. Content should only be hidden if there is a user method to show/hide that content.

Thanks for the feedback. Apologies for suggesting a bad practice. :o

RGB World - FREE and Commercial Extensions
For custom work or support, please use our Contact Form or visit our Support Forum.

Favorite Quote: There are 10 types of people in the world. Those who understand binary and those who don't. 8)


User avatar
New member

Posts

Joined
Wed Aug 08, 2012 6:11 am

Post by Dreamvention » Sun Feb 19, 2017 11:02 am

In case you ever think of using a professional module, here are our 5 cents.

https://www.opencart.com/index.php?rout ... search=dsm
In SEO Module Url we gave a large portion to breadcrumbs. We have added SEO friendly urls to products, which remove the path var, thus removing the breadcrumbs trail. but we still need breadcrumbs. Google uses them to create the snippet and its a good practice to show the visitor a structure as well as google. Removing breadcrumbs is not an option, changing them dynamically is even worse.
so we implemented this option:
http://joxi.ru/Y2LYwdnU9eNNXA

by setting a default path to the product, the breadcrumbs are always available, they a constant.

We are also preparing SEO Module Mircoformats that will take care of microformats for breadcrumbs and remove the last link to the same page. to be continued...

Many OpenCart users struggle to find quality extensions. We know how frustrating the need to fix the shop is just because of one poorly coded extension. We created quality OpenCart Extensions, tested by real developers and provide professional support.

AJAX QUICK CHECKOUT - #1 one-page checkout solution
VISUAL DESIGNER - Page builder for Opencart
View more extensions here

Tested by Shopunity.net


User avatar
Administrator

Posts

Joined
Sun Jun 17, 2012 7:04 pm
Location - Europe

Post by kia » Sun Feb 19, 2017 8:19 pm

I think the best practice is to remove links on last parts of trailers i breadcrumbs. Breadcrumbs trailers should show only text on last parts. It is bad practice SEO when a page contains links to itself, which the last parts of breadcrumbs do. This SEO issue is one of many SEO issues which OpenCart has.

kia
New member

Posts

Joined
Fri Feb 17, 2017 7:23 pm

Post by kia » Mon Feb 20, 2017 5:30 pm

uksitebuilder wrote:
Sat Feb 18, 2017 4:55 pm
You can try with this instead:

Code: Select all

  <ul class="breadcrumb">
    <?php array_pop($breadcrumbs); foreach ($breadcrumbs as $breadcrumb) { ?>
    <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
    <?php } ?>
  </ul>
I have tried this. But it doesn't have any effect. The whole trailers of breadcrums don't exist.

kia
New member

Posts

Joined
Fri Feb 17, 2017 7:23 pm

Post by harsh.k1987 » Mon Feb 20, 2017 6:08 pm

Hello,
This breadcrumb can be remove by edit each view file.
Or you can hire some developer to create a ocmod or vqmod extension to add functionality to remove the breadcrumb.
By ocmod or vqmod your core files will not change.

Thanks
Harsh Kumar
hkdev1987@gmail.com

Best Regards
Harry Kumar
hkdev1987@gmail.com
skype : hk.dev


New member

Posts

Joined
Tue May 26, 2015 7:59 pm
Location - india

Post by uksitebuilder » Mon Feb 20, 2017 6:08 pm

Strange, it works for me

Without my change
Screen Shot 2017-02-20 at 10.05.18.png

Screen Shot 2017-02-20 at 10.05.18.png (13.04 KiB) Viewed 9087 times

With my change
Screen Shot 2017-02-20 at 10.05.38.png

Screen Shot 2017-02-20 at 10.05.38.png (8.11 KiB) Viewed 9087 times


ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by mianbao » Fri Feb 24, 2017 3:19 pm

if adding the code, where is the related file in the OC 2.3.0.2. I want to give it a try.
Also because breadcrumbs are not responsive and breaking the mobile template. really looking unprofessional
please give the path to the exact file in directory.
thanks

New member

Posts

Joined
Fri Jul 15, 2016 9:57 am

Post by mianbao » Sun Feb 26, 2017 7:45 am

thanks
works nicely QUote:>>>>>
<ul class="breadcrumb">
<?php array_pop($breadcrumbs); foreach ($breadcrumbs as $breadcrumb) { ?>
<li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
<?php } ?>
</ul>

New member

Posts

Joined
Fri Jul 15, 2016 9:57 am
Who is online

Users browsing this forum: No registered users and 46 guests