Custom breadcrumbs, schema?

#900050
  • Resolved Markus Bergman
    Rank Math free

    Hi there! I recently did a relaunch of my website, where I wrote most of the code myself, rather than using premade blocks as before.

    Due to this, I created my own breadcrumb shortcode. This is so that I can link to the same landing page with different CPT’s, change link and anchor text based on category and some other things which I wanted.

    HOWEVER, this breadcrumb isn’t recognized by Google, due to schema not being added. Is it possible to add a custom schema so that this is recognized? If so how? I have full control of the HTML markup.

    Thanks!

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

    We apologize for the issue you are facing with your custom breadcrumbs and schema recognition by Google. You can indeed add custom schema markup to your breadcrumbs to ensure they are recognized properly.

    Since you have full control over the HTML markup, you can manually add the appropriate Schema.org markup to your breadcrumb structure. Here’s a basic example of how you can implement BreadcrumbList schema:

    
            Home
    
            Category
    
            Item
    

    In this example, replace the URLs and names with your actual breadcrumb links and text. Make sure to adjust the position values accordingly.

    Once you have added this schema markup to your custom breadcrumb HTML, Google should be able to recognize it as structured data. You can test your implementation using the Rich Results Test to ensure everything is set up correctly.

    If you have further questions or need assistance with specific implementations, feel free to reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Thank you for raising this concern!

    Sources:
    Configuring “Schema Markup” in Rank Math for Rich Snippets » Rank Math
    Configuring “Schema Markup” in Rank Math » Rank Math

    Hello,

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

    Creating a custom schema feature is only available in the PRO version of the Rank Math plugin: https://rankmath.com/kb/schema-generator/

    In the free version of the plugin, you can use and modify the following filter to extend the Rank Math schema:

    /**
     * Collect data to output in JSON-LD.
     *
     * @param array  $unsigned An array of data to output in json-ld.
     * @param JsonLD $unsigned JsonLD instance.
     */
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	return [];
    }, 99, 2);
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    Thank you.

    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 2 replies - 1 through 2 (of 2 total)

The ticket ‘Custom breadcrumbs, schema?’ is closed to new replies.