Incompatibility with AMP – Structured Data Error

  • Hi,

    The last ticket I put my site login details there and waited for an answer for almost a week now you guys deleted the ticket, that’s not cool.

    Anyway, I am here again and I figured out what is causing warnings on search console.

    This error (please see image below)

    https://i.imgur.com/gADl5dT.png

    is being caused by this schema field (blog) (please see image)
    https://i.imgur.com/iDDntHc.png

    Rankmath by default comes with this blog field and there is no way to deactivate, this warnings are not happening with yoast because their plugin don’t add that on the website.

    This blog field is responsible for this
    https://i.imgur.com/KdSI0Ao.png

    that’s why when I deactivate (Rank Math ld+json data) on the amp plugin these warnings don’t show.

    Please I am not trying to be a pain in the ass, I am just trying to help. since COVID google has been so strict and picky with every single thing, you might think its just a false warn but you never know with google, especially now, anything can cause a rank drop.

    Thank you.

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

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

    Apologies about your other ticket, I’ll have the team look into this.

    To remove the blog schema from your homepage you can use the following filter:

    
    /**
     * Filter: Remove/modify schema data.
     *
     * @param array $return Array of json-ld data.
     */
    add_filter( 'rank_math/json_ld', function( $data, $json ) {
    	if ( is_home() && isset( $data['Blog'] ) ) { // Remove Blog Snippet from homepage.
    		unset( $data['Blog'] );
    	}
    	return $data;
    }
    

    Looking forward to helping you. Thank you.

    ​​​​​​​

    HI,

    What if I dont want to remove the blog schema? how do I fix that?

    Or is there any other way to get this result (https://imgur.com/KdSI0Ao) without the blog schema?

    Thank you.

    Hello,

    The blog schema is added because you have set your homepage to show your latest posts.
    Could you please guide us as to how you can=me to the verdict that the blog schema is the cause of the error so we can be able to understand how to help you. You can use https://www.loom.com to record a screencast and share the URL in the sensitive section.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Alright i will make a video.

    thanks.

    Hello,

    Perfect, you can record it with https://loom.com/ and easily share its URL here.

    Looking forward to help you.

    Hi,

    I will make the video by using the code to remove the blog schema you provided, but the code is wrong, I get this error while adding the code to the fuctions.php

    syntax error, unexpected end of file, expecting ‘)’

    Can you please check the code.

    Thank you.

    Hello,

    Could you share the code you added to see if there is any difference with the code my colleague shared so we can determine the cause of your issue?

    Looking forward to help you.

    Hi, I just copied and past. here a screenshot

    https://i.imgur.com/WfWpL96.png

    Thanks.,

    Hello,

    Just add the following code after the bracket in the line 44:

    , 10, 2);

    Looking forward to help you.

    Hi,

    That code did not remove the blog schema.

    Its fine, I quit, you can close the thread.

    Thanks.

    Hi Bue,

    We are so sorry to hear that.

    If you need help with anything else, please open a new support ticket here so we can help.

    We are always here for assistance.

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

The ticket ‘Incompatibility with AMP – Structured Data Error’ is closed to new replies.