I need help to remove Person type from Homepage schema

#581916
  • Resolved Anonymous
    Rank Math free

    Hi guys,

    I am having hard time with the Person entity on the autogenerated schema for the homepage. The thing is that i cannot manually edit it from the Rankmath sidebar Gutenberg area, since is not showing any.

    I really need to remove or update the schema because i want to have Organization only and nothing else.

    Please guide, I am not that educated about this process and I simply want to have my website name on the search engine showing and not the domain.

    https://imgur.com/LOqLbYf – SERP results of my website

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

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    To remove the Person schema on your homepage, you may need to use this filter on your site:

    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	if ( ! is_front_page() || ! isset( $data['publisher'] ) ) {
    		return $data;
    	}	unset( $data['publisher'] );
    	unset( $data['place'] );	return $data;
    }, 99, 2);

    And here’s a link on how to apply a filter on your site:
    https://rankmath.com/kb/filters-hooks-api-developer/

    Hope that helps.

    Thank you.

    Anonymous
    Rank Math free

    Hi again,

    Thanks for the detailed reply and assistance.

    My next question is: Is there any way that I can filter out the whole default schema that is added on the homepage and add a new JSON one from custom HTML?

    Thanks again!

    Hello,

    If you want to remove all the default schema from your homepage then you can replce the schena with the following one:

    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
        if ( ! is_front_page() || ! isset( $data['publisher'] ) ) {
            return $data;
        }	
        unset( $data['publisher'] );
        unset( $data['place'] );
        unset($data['WebPage']); 
        unset($data['WebSite']);
        unset($data['ImageObject']);
        return $data;	
    }, 99, 2);
    

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

    Anonymous
    Rank Math free

    Hi again guys,

    Thanks for the updates and the provided filters. Here is the thing I am facing with both of them:

    With the first filter to remove the Person entity from the default schema, it removes the whole published type and leaves the result as a Thing and completely removes both Organization and Person publisher type.

    While with the second to completely remove the default schema, once I add the bigger and broader filter, it is not recognizing the new schema data I add with a custom HTML on the frontpage through Elementor.

    I would really appreciate if you can look into this and eighter give me option to remove only the Person and leave the Organization schema in, or remove the default schema completely without affecting the custom one I will add.

    Hope this insight is clear and I really hope that you will help me out.

    Bests,
    Toshe

    Hello,

    Both the Person and Organization schema properties are under the publisher property so removing the publisher will remove both the Person and Organization. Since you wish to retain the Organization schema, please head over to your WordPress dashboard > Rank Math > Titles & Meta > Local SEO and switch the “Person or Company” to “Organization”. You can then remove the one line from the filter code that unsets the publisher schema.

    Can you please let us know which custom HTML schema you are trying to add? You may share that HTML here in the form of a screenshot or URL so we can check the schemas in it.

    We are looking forward to helping you with this one.

    Anonymous
    Rank Math free

    Hi Jeremy,

    Thanks for the reply. I was able to find the issue in the Local Schema tab and I already sort it out. Thanks a lot and now I have no further concerns about that. Thanks for the detailed answer!

    Have a great day!

    Hello,

    Glad that everything has been sorted out.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

The ticket ‘I need help to remove Person type from Homepage schema’ is closed to new replies.