Adding author url in structured data inside Web Stories

#284698
  • Resolved Saumya Majumder
    Rank Math free

    Hi,
    I am asking this question for one of my client sites which is running Rank Math PRO along with Google Web Stories. Now I have enabled the Google Web Story Integration inside Rankmath Dashboard.

    But when the client is running Rich Snippet Testing on a Web Story, Google is giving warning as the Author section in the structured data does not have a “URL” data. Screenshot: https://i.imgur.com/GE4fiBm.png

    I have added the web story link shown in the screenshot above in the sensitive data section.

    Now when I checked the source code of the web story page (by doing view source) I saw that there are 2 structured data that is being added to the page and they are as following:

    https://pastebin.com/KbT0cTwS

    There is no issue with this structured data but just after that there is another structured data:

    https://pastebin.com/3j8bSJaP

    Now in this structured data you see there is a section showing "author":{"@type":"Person","name":"Cassidy Tuttle"}} and here I need to add the URL field as well according to Google tests.

    Now while Googleing I came across this thread: https://support.rankmath.com/ticket/change-author-url-in-article-schema/ where this code snippet was mentioned:

    
    add_filter( 'rank_math/snippet/rich_snippet_article_entity', function($entity) {
        $entity['author'] = [
    	'@type' => 'Person',
    	'name'  => 'Author Name',
        ];
    
        return $entity;
    });
    

    But unfortunately, when I ran that, It was adding the data to the First structured data and the second structured data remained unaffected. Now after spending a lot of time I could not figure out which filter I need to call to add the author URL on the second structured data and not the first one.

    Can anyone look into this and let me know the correct filter or snippet I need to call to make that happen?

    Please note that:

    ————————————–

    Another wired BUG that I have found is that if I enable the Google Web Stories Integration in Rankmath, It is adding the same <title> twice. Here are the screenshots:

    With Web Stories Integration Enabled In Rankmath checking the view source of a web story: https://i.imgur.com/Gl4AB3Y.png

    With Web Stories Integration DISABLED: https://i.imgur.com/bMATKWy.png

    Looking forward to the reply on both cases. Due to the double title issue I have disabled the Web Stories integration now on the site.

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

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

    The second set of Schema markup you see on the page is not coming from Rank Math. Our markup will always be inside a script tag with the class mentioning our plugin which is not the case for the second option.

    ​​​​​​​Regarding the double title, it’s likely that either the theme or the plugin is adding the other title below the information from Rank Math. You can get clarification from the plugin developers if they run any function to add a title and how you can disable theirs from running on the website.

    Don’t hesitate to get in touch if you have any other questions.

    The second set of Schema markup you see on the page is not coming from Rank Math. Our markup will always be inside a script tag with the class mentioning our plugin which is not the case for the second option.

    – Yes you are right. It was being added by Google Web Stories plugin and they had a filter using which I added the URL.

    ​​​​​​​Regarding the double title, it’s likely that either the theme or the plugin is adding the other title below the information from Rank Math. You can get clarification from the plugin developers if they run any function to add a title and how you can disable theirs from running on the website.

    – This is TOTALLY WRONG. I’ve run extensive check to confirm that the second <title> tag is being added by Rankmath when the Web Stories integration is enabled. The way it is happening is that when the Web Stories integration is enabled in Rank Math then one <title> tag is being added by the Web Stories plugin while the other one is being added by the Rankmath.

    As soon as I disable the Web Stories integration in Rankmath, the second title goes away.

    The theme does no modifications on the Web Stories and there is no other plugin on the site that can do this.

    Hello,

    That second title is coming from the Web Stories and you can disable that generation by adding the following filter:

    
    add_filter( 'web_stories_enable_metadata', '__return_false');
    

    This should prevent the title from that plugin from being outputted in the source code.

    Don’t hesitate to get in touch if you have any other questions.

    Hi Miguel,
    Thank you so much. I can confirm that that the above code snippet worked and the double title tag issue has been resolved thank you so much.

    Azib Yaqoob
    Rank Math business

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    Thank you.

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

The ticket ‘Adding author url in structured data inside Web Stories’ is closed to new replies.