Skip to main content

All Questions

Tagged with
1 vote
1 answer
218 views

Is it possible to get Yoast primary category from product ID alone

Is it possible get Yoast Primary Category from Product ID ($product->get_id()) alone? I've tried $primary_term_id = yoast_get_primary_term_id( 'product_cat', $product->get_id() ); but to no ...
Kingsford's user avatar
2 votes
0 answers
96 views

Unable to update Focus keyphrase in woocommerce product category using update_post_meta

I am trying to update yoast focus keyphrase using the code below. add_action( 'created_product_cat', 'ts_custom_woocommerce_placeholder', 10, 2 ); function ts_custom_woocommerce_placeholder( $post_id )...
Danilo Credo Lu-ang II's user avatar
1 vote
2 answers
931 views

Yoast breadcrumbs not displaying correctly on imported WooCommerce products

I am importing products via Product Import Export for WooCommerce by WebToffee, I then have a function that pulls data from an API and populates the data in each imported product. Everything works ...
JackPDLTD's user avatar
2 votes
2 answers
1k views

Add/update SEO metakeywords programmatically of woocommerce product

Could you tell me please, what is the best way to add/update SEO metakeywords programmatically? i looked it up and found on this article how to update meta title and meta desc : https://ehikioya.com/...
davidasor's user avatar
  • 319
1 vote
0 answers
494 views

Set 'nofollow' in Yoast, for Woocommerce product pages in a specific category

I have been trying to exclude a specific "wholesaler-category"(b2b_only) from being indexed. Bellow code seems to be ignored by Yoast. Or as far as I can see in the meta header, the products ...
Pandusen's user avatar
1 vote
2 answers
2k views

WooCommerce: Add brand and gtin to product schema markup in Yoast

I want to add a brand and a gtin to my product markup in WooCommerce. At the moment the Yoast SEO plugin already adds a lot of markup. But it only has the option to add the brand with a product ...
Cray's user avatar
  • 5,433
3 votes
1 answer
3k views

WordPress: Overwrite the canonical URL in YoastSEO

I'm using a snippet to overwrite the canonical URL in YoastSEO for WordPress/WooCommerce. The snippet is based on the official docs example: https://developer.yoast.com/features/seo-tags/canonical-...
Cray's user avatar
  • 5,433
0 votes
1 answer
69 views

Woocommerce and Yoast product search error

I've been trying to use product search in the admin area, it used to work fine, now i get this errors: SELECT DISTINCT posts.ID as product_id, posts.post_parent as parent_id FROM mu05iq_posts posts ...
Steve's user avatar
  • 637
2 votes
1 answer
2k views

Prevent googlebot from crawling woocommerce filters

Google bot is crawling product filter parameters like following: /shop/?filter_size=10 /shop/?filter_color=red /shop/?filter_color=blue?filter_size=20 I tried to add following rules in robots.txt file ...
Nash's user avatar
  • 365
0 votes
0 answers
172 views

Disallow robots on woocommerce .txt not working on Bing/Google/Yahoo

I am having trouble stopping Google/Bing and Yahoo from crawling specific products on my Woocommerce store. The urls I want to exclude from search results are https://www.url.com/product/mm6040my/ ...
dsion7's user avatar
  • 1
1 vote
1 answer
754 views

How to use product full description as meta description in wordpress

I want to use product full description as meta description in wordpress I'm using Yoast SEO. There is %%excerpt%% keyword to get short description. But I want full description. There is no keyword for ...
sabithkumar's user avatar
-1 votes
1 answer
846 views

show related product by primary category in wordpress

I have products with two categories assigned I selected the primary category on each products under category selection. Now I want to show related products by primary products. I am using the yoast ...
Muhammad Afzal's user avatar
0 votes
1 answer
254 views

WordPress: Add meta title if there is no title dedined

I want to add a meta title in Yoast if there is no title set in the product. To do this, I'm using the following function: add_filter( 'wpseo_title', 'wpseo_change_product_title' ); function ...
Cray's user avatar
  • 5,433
1 vote
1 answer
4k views

WooCommerce: Get URL of paged shop archive

I need the link to the paged shop archive URL to add it as rel=canonical. As default WooCommerce seems to use always the URL of the "All products" page. For example: The all product archive ...
Cray's user avatar
  • 5,433
0 votes
2 answers
2k views

WooCommerce: Remove "Products" archive from Yoast breadcrumbs

I want to remove the link to the products archive in the breadcrumbs on all pages. To do that, I found a solution in the Yoast docs. It works fine except on the product pages. Here's my current code: /...
Cray's user avatar
  • 5,433

15 30 50 per page