swpshadley
Forum Replies Created
-
Ah, should’ve seen that – thanks.
Hi Alex,
Thanks for the reply. I’m trying to add a custom product attribute (“pa_unit_of_measure”).
That would be great if you could post that code. Thanks.
Going to put the raw code in too in case that blog dies…
<?php // Remove the last link in breadcrumbs // WHY? Because it an span tag that contains the title of the page // But you're already on the page, so what's the point? add_filter( 'wpseo_breadcrumb_links', 'jj_wpseo_breadcrumb_links' ); function jj_wpseo_breadcrumb_links( $links ) { //pk_print( sizeof($links) ); if( sizeof($links) > 1 ){ array_pop($links); } return $links; } // Add link to the last item in the breadcrumbs // WHY? Because, by default, WP-SEO doesn't include the link on the last item // Since we removed in the function above, we need to add the link back in. add_filter( 'wpseo_breadcrumb_single_link', 'jj_link_to_last_crumb' , 10, 2); function jj_link_to_last_crumb( $output, $crumb){ $output = '<a rel="v:url" href="'. $crumb['url']. '">'; $output.= $crumb['text']; $output.= '</a>'; return $output; }
Goes right in the ol’ functions.php file.
Figured out a non-invasive solution!!!
Check out this guy’s blog post –
https://thejasonjones.com/wordpress-seo-breadcrumbs-tweaks/THANK YOU JASON JONES!!!!!!!!!!!!! (x a billion)
And thank you again Luke for your assistance.
I’d like to politely ask the Yoast SEO plugin author Joost de Valk to consider implementing a GUI modification for this in the plugin settings – would have saved me hours.
Okay, I figured it out…
You have to comment out the following “if” statement starting on line 323 (or there abouts), about 3/7 down the file.
if ( isset( $this->post->ID ) ) { $this->add_single_post_crumb( $this->post->ID ); }
Now, this will work, but only until you update the plugin again (which will overwrite this). I’ll post back if I find a way to implement this in functions.php, but no promises on that.
Hi Luke,
I really appreciate the links, but I don’t think those help me with the Yoast SEO breadcrumb which I would like to edit (if I’m wrong, please let me know).
Pretty sure the Yoast SEO plugin generates its own breadcrumb. I just want to leave off the last item (the current product name) in the YOAST SEO-generated breadcrumb.
Still looking for an answer – thanks though Luke.
Forum: Plugins
In reply to: [Yoast SEO] Primary Product Category not workingWAIT…
I just found the REAL solution. You have to enable Yoast Breadcrumbs in order for the primary product category to work.
See this – https://kb.yoast.com/kb/implement-wordpress-seo-breadcrumbs/
Forum: Plugins
In reply to: [Yoast SEO] Primary Product Category not workingResolved
Forum: Plugins
In reply to: [Yoast SEO] Primary Product Category not workingI figured out why it wasn’t working.
A product can’t have more than one parent product category checked. It can have a great-grandparent, a grandparent, and a parent, but not two grandparents or two parents.
Hope that makes sense to anyone with the same question.
Forum: Plugins
In reply to: [Yoast SEO] How to find which posts use the same keyword?Awesome, thanks Ben.
Strangely, the url method didn’t work for me (even after replacing the domain name with our domain name and one of our product keywords for “lorem”). It returned no results.
We ended up just setting the number of products per page to like 500 so we could see all of them, then searching the page for the keyword (ctrl + f). NOTE: we did have to increase the memory limit in php.ini.
Thanks again for the suggestions Ben! Hopefully one of these three methods will work for anyone else reading this article.
Forum: Plugins
In reply to: [Yoast SEO] How to find which posts use the same keyword?bump…
Forum: Plugins
In reply to: [Email Cart for WooCommerce] Update Cart ButtonNevermind,
Had something to do with a theme update on our staging site.
I apologize – Thanks.
Forum: Plugins
In reply to: [WooCommerce] Remove tooltips on product imageI second the title solution by kimsf. Thank you!
However, does anyone know if this will effect SEO for the image? Thanks in advance.
Forum: Fixing WordPress
In reply to: How to change URI locations?Thanks for the reply Peter.
I misunderstood the definition of URI (with an “i” not an “L”). Seems that a URL is a URI. My apologies for lack of research on my end.
Forum: Plugins
In reply to: Show drop downs on variation products with no prices WoocommerceResolved