BreadCrumbs in WooCommerce Archive

  • Hello,

    Using the Google Schema Org tool I have some error in the WooCommerce product archive.
    Please see the link in the Sensitive Data.

    Looks like the breadcrumb is generated also by Rank Math plugin.
    How can I fix this error?
    I already checked the “No
    Is there a way to manually edit the values for the BreadCrumbs rich snippet?
    My main problem is to get rid of the Google error.

    Thanks!

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    You can modify the property that is listed as false by using the following code to change the item. This code should be added to your functions.php file:

    /**
     * Allow changing Breadcrumb elements in BreadcrumbList snippet
     *
     * @param array $entity Breadcrumb entity
     */
    add_filter( 'rank_math/snippet/breadcrumb', function( $entity ) {
    	return $entity;
    });

    I have also noted that you do not have any breadcrumbs on this page and thus you can also remove the breadcrumbsList schema by using the following code:

    /**
     * Allow developer to disable the breadcrumb json-ld output.
     *
     * @param bool $unsigned Default: true
     */
    add_filter( 'rank_math/json_ld/breadcrumbs_enabled', '__return_false' );

    Looking forward to helping you. Thank you.

    ​​​​​​​

Viewing 1 replies (of 1 total)

You must be logged in to reply to this ticket.