Problem with OG TAG

#705714
  • Resolved Anonymous
    Rank Math free

    Hi,
    I have a strange problem for some time. Google Discover recognizes the “ya:ovs:upload_date” tag (the date of the video embedded in the publication), as the date of the publication text in which the video is embedded.

    Have you had such cases? can I do something about it or somehow disable the use of this one tag?

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

    We’re sorry to hear about the issue you’re facing with the “ya:ovs:upload_date” tag. It seems that Google Discover is recognizing the date of the video as the date of the publication text, which is causing confusion.

    To address this issue, you can use a filter to modify the “UploadDate” Schema property in your theme’s functions.php or rank-math.php file. This filter will ensure that the UploadDate Schema property includes the correct timezone information.

    Here’s the filter code you can use:

    add_filter( 'rank_math/snippet/rich_snippet_videoobject_entity', function( $entity ) {
        if ( empty( $entity['uploadDate'] ) ) {
            return $entity;
        }
    
        $parts = explode( 'T', $entity['uploadDate'] );
        if ( ! empty( $parts[ 1 ] ) ) {
            return $entity;
        }
    
        $entity['uploadDate'] = wp_date( 'Y-m-dTH:i:sP', strtotime( $entity['uploadDate'] ) );
    
        return $entity;
    } );

    By adding this filter, you can ensure that the correct timezone information is included in the UploadDate Schema property, which should help resolve the issue you’re experiencing with Google Discover.

    If you have any further questions or need additional assistance, please feel free to ask.

    Sources:
    Resolving Rank Math Schema Markup Related Issues
    How to Remove Date Snippets from Search Results » Rank Math
    Open Graph Meta Tags » Rank Math

    Anonymous
    Rank Math free

    i also check if it help if i delete embed video from publication. Its not helping at all.

    Hello,

    In this case, if you want to remove this meta tag from your pages then you can use the following filter on your website:

    add_filter( 'rank_math/opengraph/facebook/ya_ovs_upload_date', '__return_false');
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

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

The ticket ‘Problem with OG TAG’ is closed to new replies.