How to add ItemList Schema in Archive and category pages?

#80316
  • Resolved Akshay
    Rank Math free

    I want to add Itemlist schema to my category pages, How to do that? Is there any code you can provide?

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    Categories usually take up their schema from the posts/pages included.

    Rank math doesn’t have that specific schema but you can use the guide by Google support here: https://developers.google.com/search/docs/data-types/carousel and the following Rank math filter, assuming you have not enabled the option to remove rich snippets from categories:

    
    /**
     * 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 [];
    }, 10, 2);
    

    We do not provide custom code and you will therefore need to seek the help of a developer to customize the code above to fit your purpose.

    You can also search and install a third party plugin that supports such schema on your site. Just make sure to disable Rank math schema module in Rank math dashboard to avoid conflicts.

    Hope that helps. If you have any further question(s), please let us know. 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 1 replies (of 1 total)

The ticket ‘How to add ItemList Schema in Archive and category pages?’ is closed to new replies.