- This topic has 21 replies, 5 voices, and was last updated 3 years, 2 months ago by
David.
-
AuthorPosts
-
January 31, 2023 at 12:35 pm #2516145
Ying
StaffCustomer SupportI have disabled the custom cart and still get the same result in the SEO when scanned.
So it looks like the issue is not caused by the Custom cart. Is the default Woo cart enabled?
I would like it to the right of the login|register. Can we do this with CSS
Maybe, it depends on your site header structure. But we should find out what causes the issue first.
Can you disable both the custom cart and the default Woo cart and redo the test?
Let me know!
January 31, 2023 at 1:06 pm #2516205Craig
I did that – disabled both the custom cart and the default Woo cart and redid the test.
When no cart is enabled all the issues go away.
January 31, 2023 at 2:53 pm #2516344Ying
StaffCustomer SupportHum… if the shopping cart is causing the issue, then as Daivd said here:
https://generatepress.com/forums/topic/add-missing-link-text-to-2-internal-links/#post-2515403It sounds like a false error.
January 31, 2023 at 11:26 pm #2516607Craig
What do I do from here?
February 1, 2023 at 7:09 am #2516998David
StaffCustomer SupportAdd this PHP Snippet to your site:
add_filter( 'generate_svg_icon', function( $output, $icon ) { if ( 'shopping-cart' === $icon ) { $svg = '<svg viewBox="0 0 576 512" aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em"> <title>View Shopping Cart</title> <path fill="none" d="M0 0h576v512H0z"/> <path d="M181.54 409.6c-29.249 0-52.914 23.04-52.914 51.2 0 28.16 23.665 51.2 52.915 51.2 29.249 0 53.18-23.04 53.18-51.2 0-28.16-23.931-51.2-53.18-51.2zM22 0v51.2h53.18l95.725 194.304-35.897 62.464C115.598 342.272 141.124 384 181.54 384h319.08v-51.2h-319.08l29.249-51.2h198.096c19.943 0 37.492-10.496 46.533-26.368L550.61 89.088c9.838-16.896-2.925-37.888-23.133-37.888H133.944L108.95 0H22zm425.442 409.6c-29.25 0-52.915 23.04-52.915 51.2 0 28.16 23.665 51.2 52.915 51.2 29.249 0 53.18-23.04 53.18-51.2 0-28.16-23.931-51.2-53.18-51.2z"/> </svg>'; return sprintf( '<span class="gp-icon %1$s"> %2$s </span>', $icon, $svg ); } return $output; }, 15, 2 );And then clear the transient and site caches in Woocommerce > Status > Tools.
Also clear any plugin caches, and then add and remove an item to your cart.This will update the shopping cart SVG icon to include the
<title>View Shopping Cart</title>tag.
It should be completely unnecessary to do this, but it make whatever SEO software you’re using happy.If it doesn’t then either ignore that warning or speak to the provider and ask them to explain what they expect when there is shopping cart icon in the menu.
February 1, 2023 at 11:52 am #2517469Craig
David, Ying – Thank you.
You are very bright and helpful.David that code works.
You have a customer for life 🙂
Thank you
February 2, 2023 at 2:04 am #2518226David
StaffCustomer SupportGlad to be of help!
-
AuthorPosts
- You must be logged in to reply to this topic.