Removed Schema default website

#233330
  • Resolved luís Dominguez
    Rank Math free

    I want to remove the default website schema that is integrated in all pages.
    In order to create a more customized one

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

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

    You can set the default schema to None for your posts types/pages on your WordPress dashboard > Rank Math > Titles & Meta

    Post types none

    I hope that helps.

    Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    I have it set to none but it still shows a webpage schema when I activate the rank math schema module.

    What could be happening?

    Hello,

    You can use this filter to remove the WebPage Schema data on your site:

    /**
     * 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 ) {
    	unset($data['WebPage']);
    	return $data;
    }, 99, 2);

    And here’s a link to how to use a filter on your site:
    https://rankmath.com/kb/filters-hooks-api-developer/#adding-filters-and-hooks-in-rank-math-php

    I hope that helps.

    Thank you.

    It worked correctly. Thank you.

    Now I need to remove the other three schemas it creates by default: organization and website. This way I can create and customize them as I need them.

    Could you help me?
    thanks

    Hello,

    Thank you for your patience.

    Could you please confirm if you’re still going to use Rank Math to generate the schema for your site?

    If not, you can simply disable those schemas by deactivating the Local SEO and Schema Modules in Rank Math > Dashboard

    Local SEO Schema Modules

    I hope that helps.

    Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    Sorry for the inconvenience, yes sure, I want to remove the default schemas and create custom ones with rank math.

    Prabhat
    Rank Math agency

    Hello,

    You can follow this guide to disable the Organization schema:
    https://rankmath.com/kb/remove-organization-schema/

    To disable the WebSite schema, you can extend the code provided by my colleague:

    /**
     * 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 ) {
    	unset($data['WebPage'], $data['WebSite']);
    	return $data;
    }, 99, 2);

    Hope that helps.

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

The ticket ‘Removed Schema default website’ is closed to new replies.