GSC Fix: Video is not the main content of the page
2 mins read

GSC Fix: Video is not the main content of the page

Video is not the main content of the page

Recently adult webmasters have been encountering this error on all of their WP-script sites: Video is not the main content of the page.

There are two causes of this issue:
1. Permalink Structure – append the word “video”
2. Video Schema – set incorrectly by default

In some cases, both of these issues will need to be fixed to get your posts indexed back onto the video page.

1.Permalink Structure

This fix is easy. Simply log into your WordPress Dashboard and go to settings > permalinks. Set the permalink to custom and append the word “video” or the word “watch” so that your structure looks like the image below.

2.Video Schema

First of all, Google did not kill embedding. WPS theme’s default code is causing this error. It is telling Google that this is a video post but it is not providing enough details about the video or perhaps its not structured consistently with GSC’s recent updates. To fix this, we are going to need to edit the theme files. Make sure you are working on a child theme. If you are not, I suggest you set that up first by visiting my post on creating a Child Theme for WP-Script themes.

If you are using Retrotube, the file that we’re editing is /template-parts/content-video.php. We will not remove any code, we are going to simply add a custom video schema.

<head>
    <title><?php echo $title; ?></title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "VideoObject",
      "name": "<?php echo $title; ?>",
      "description": "<?php echo $title; ?>",
      "thumbnailUrl": "<?php echo $poster; ?>",
      "uploadDate": "<?php echo get_the_date('c'); ?>",
      "duration": "<?php echo $duration; ?>",
      "contentURL": "<?php echo $video_url; ?>",
      "interactionStatistic": {
        "@type": "InteractionCounter",
        "interactionType": { "@type": "WatchAction" },
        "userInteractionCount": <?php echo $views;?>
      }
    }
    </script>
</head>

Make sure you position this code block beneath all of your variables. If you are not using the $duration variable you can simply remove that line. If you are not using the $views variable, simply remove the @type InteractionCounter section.

Now that you have edited the permalink structure and have added the video schema into your theme, you should be done. Login to your Google Search Console and validate the fix.

Disclaimer: I am not using the default video player so I apologize if this doesn’t fix the immediate issue. If it does not work, you will need to do a few more minor modifications on your own.

Leave a Reply

Your email address will not be published. Required fields are marked *