Url in SERP
-
Hi there, I was wondering, why Google displays my URL like this: https://imgur.com/od4YICv instead of showing the full path URL.
I use Woocommerce and I would like to know if there is a way to change the default “nnhotempo.it › Prodotti” displayed for all products.
Thank you for your supportThe page I need help with: [log in to see the link]
-
Hello @gamma42!
Those are breadcrumbs. Search engines like Google have started showing breadcrumbs, along with the SEO title, on search results and these breadcrumbs are based on your site structure. More details here: https://yoast.com/breadcrumbs-seo/
Hi there, thank you very much for your reply.
Therefore I have changed my settings in Yoast like this: https://imgur.com/dB0Xjxd
Now in source code I see this:
{"@type":"BreadcrumbList","@id":"https:\/\/nnhotempo.it\/tempo-libero\/cyclette\/diadora-racer-23\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"item":{"@type":"WebPage","@id":"https:\/\/nnhotempo.it\/","url":"https:\/\/nnhotempo.it\/","name":"Home"}},{"@type":"ListItem","position":2,"item":{"@type":"WebPage","@id":"https:\/\/nnhotempo.it\/shop\/","url":"https:\/\/nnhotempo.it\/shop\/","name":"Prodotti"}},{"@type":"ListItem","position":3,"item":{"@type":"WebPage","@id":"https:\/\/nnhotempo.it\/tempo-libero\/cyclette\/diadora-racer-23\/","url":"https:\/\/nnhotempo.it\/tempo-libero\/cyclette\/diadora-racer-23\/","name":"Diadora Racer 23"}}]}
Is there a way to eliminate the position N°2 ? I don’t want to display the breadcrumb which link to page shop. I want the breadcrumb reflects the url of my page, where there is only parent-category->child-category->productHi @gamma42,
Thank you for your reply.
There is no Yoast option to delete the shop page from it, it’s based on how WooCommerce internals work. You could not select a shop page under WooCommerce → Settings → Products, but we’re not sure if that is what you would like or should look into. You can, however, always use filters to change the breadcrumbs to remove this part too, as seen here: https://gist.github.com/amboutwe/4b7a2f01366399281a53c355c5b78801.
Thank you Jeroen for your precious advise,
I have found this function:
/* ** Remove "Products" from Yoast SEO breadcrumbs in WooCommerce */ add_filter( 'wpseo_breadcrumb_links', function( $links ) { // Check if we're on a WooCommerce page // Checks if key 'ptarchive' is set // Checks if 'product' is the value of the key 'ptarchive', in position 1 in the links array if ( is_woocommerce() && isset( $links[1]['ptarchive'] ) && 'product' === $links[1]['ptarchive'] ) { // True, remove 'Products' archive from breadcrumb links unset( $links[1] ); } // Rebase array keys $links = array_values( $links ); // Return modified array return $links; });and now, after I have added the function the result is:
{"@type":"BreadcrumbList","@id":"https:\/\/nnhotempo.it\/tempo-libero\/cyclette\/diadora-racer-23\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"item":{"@type":"WebPage","@id":"https:\/\/nnhotempo.it\/","url":"https:\/\/nnhotempo.it\/","name":"Home"}},{"@type":"ListItem","position":2,"item":{"@type":"WebPage","@id":"https:\/\/nnhotempo.it\/shop\/","url":"https:\/\/nnhotempo.it\/shop\/","name":"Prodotti"}},{"@type":"ListItem","position":3,"item":{"@type":"WebPage","@id":"https:\/\/nnhotempo.it\/tempo-libero\/cyclette\/diadora-racer-23\/","url":"https:\/\/nnhotempo.it\/tempo-libero\/cyclette\/diadora-racer-23\/","name":"Diadora Racer 23"}}]}Should be fine now for Google SERP.. what do you think Jeroen?
Hi @gamma42,
Thank you for your reply.
It’s hard to look at this excerpt like this. We would recommend checking the URL using the Google Structured Data Testing tool here to see if it is valid and shows the information you want. If it validates, then you are good to go.
We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.
The topic ‘Url in SERP’ is closed to new replies.