Is it possible to change the schema type for WooCommerce products post type?

#120397
  • Resolved Alex
    Rank Math free

    Is it possible to change the schema type from ‘product’ to ‘event’ for WooCommerce products?
    /wp-admin/admin.php?page=rank-math-options-titles shows you can only choose “None” or “WooCommerce Product” and I would like the option “Event”

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    I’m sorry for the delay.

    To change the schema on Woocommerce Products page, you can use the plugin’s filter code.
    Please try the solution given in this thread: https://support.rankmath.com/ticket/event-snippet-with-woo-products/

    I hope that helps. Thank you, and looking forward to your update.

    Alex
    Rank Math free

    Hi Reinelle B,
    Thanks for your reply.
    Unfortunately, the link provided did not solve my problem. Please see the following images:
    https://ibb.co/6Hz18t6
    https://ibb.co/927mN1D
    It is still locked to product and event is not available.
    Thanks

    Hello,

    The screenshots don’t load for me.

    The code provided will work in the front end, you can confirm this by checking your URL with Google rich results test tool: https://search.google.com/test/rich-results.

    Hope this helps you.

    Alex
    Rank Math free

    Hi Michael,
    The code provided which displays on the front end is erroneous and not dynamic:
    There are fixed values like the event type, start date, end date and performer.

    The screenshots show the Rank Math SEO Meta Box on a single product.
    Under the schema tab the Schema types are ‘None’ or ‘WooCommerce Product’. I was just wondering if it was a possibility to add ‘Event’ as a schema option here?

    Thanks

    Hello,

    Sorry for the delay.

    I am afraid that WooCommerce only allows the product schema since the product attributes are extracted from the product data. However, you can set the rich snippet to none via Rank Math > Titles & Meta > Product and then generate your very own custom schema data using filters.

    I hope that helps. Thank you, and looking forward to your update.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Is it possible to change the schema type for WooCommerce products post type?’ is closed to new replies.