• Resolved kocmocq

    (@kocmocq)


    Hi,

    Hope someone has come up with a solution on this.

    How can I remove the “Product” prefix from attributes breadcrumb path?

    Now my breadcrumb shows as:

    Home > Product Attribute Name > Attribute Value

    I need this:

    Home > Attribute Name > Attribute Value

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there!

    Could you please share a link to your site so that I can check and provide you with guidance?

    Thank you!

    Thread Starter kocmocq

    (@kocmocq)

    Hi,

    It’s on production level on localhost but this issue is global (on product categories and tags there is no “Product” prefix on breadcrumb.
    I’m sending you screenshots from 2 different sites.
    I’m using a clean installation with the latest versions of Woo + Storefront on PHP 8.0.
    Hope that helps.

    Screenshot 1
    Screenshot 2

    Thank you!
    Ioannis

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi Ioannis!

    Thank you for the screenshots.

    I ran a test on my end, and I couldn’t replicate the issue. Could you please the provide me the steps in order to reproduce this issue?

    Thanks!

    Thread Starter kocmocq

    (@kocmocq)

    Hi Gabriel,

    As you can see on screenshots, WooCommerce puts automatically in the breadcrumb path (before the attribute name) the “Product” prefix.

    My attributes names are “Artists” and “Book Authors”. Woo prints “Product Artists” and “Product Book Authors”.

    My question is how we can remove the “Product” prefix from attributes breadcrumb path?

    Thank you.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Yes, I can see that the Product prefix string is being added to your attribute.

    It seems that the string has been manually on the product’s attribute/category name so that’s why it is reflecting on the site. It would be great if you could provide a live link to this issue so that I can inspect the code of it.

    Upon testing, I couldn’t reproduce this issue on my end. Here is a screenshot:

    https://www.screencast.com/t/sdgUfRA1sl

    Cheers!

    Thread Starter kocmocq

    (@kocmocq)

    Hi Gabriel,

    The string has not been added manually, it’s a global issue on WooCommerce.
    I have tested on several sites.

    “Clothing” at your attachment is a Category, not an attribute. Categories and tags not adds the “Product” string. This happens only at attributes.

    If you add a new attribute with the name “Clothing” and slug “clothing” you will see the name “Product Clothing” at the breadcrumb path.

    Here is a live example:

    https://notisjewels.gr/material/gold-plated-22k/

    Attribute name is “Material” but breadcrumb path display “Product Material”.

    Hope that helps.

    Thank you.

    Hi @kocmocq,

    This one is a tricky one. Attributes are a “taxonomy” that’s part of WooCommerce. What’s listed here as “Product Material” is the actual label which is a combination of “Product” + the attribute title.

    This particular label can be found in line 221 of the /includes/class-wc-post-types.php file.

    
    'name' => sprintf( _x( 'Product %s', 'Product Attribute', 'woocommerce' ), $label ),
    

    You may find changing it to be easiest with a translation plugin. That’s one way to change the built-in text in WooCommerce. I used Loco Translate to locate this string:

    
    Product %s
    

    I changed it like this:

    changes

    After saving my changes, this is what the breadcrumbs look like for this attribute term.

    breadcrumbs

    Give that a try and let us know if you have any questions.

    Plugin Support fevered – a11n

    (@fevered)

    Hey there, since we haven’t heard back from you in awhile I’ll mark this thread as resolved now. If you have any further questions, I recommend creating a new thread.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Remove the “Product” prefix from attrinutes breadcrumb path’ is closed to new replies.