Title: AMP and Videoobject microdata
Last modified: May 12, 2020

---

# AMP and Videoobject microdata

 *  Resolved [promohunt](https://wordpress.org/support/users/promohunt/)
 * (@promohunt)
 * [6 years ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/)
 * Hello. Thank you very much for the lightweight, compared to analogs and custom
   plugin !.
 * Please tell me – I use the wp-youtube-lite plugin to embed videos from youtube.
   
   It adds a microdate to the page – but unfortunately does not do this for AMP 
   pages. Please tell me what can be done in this case, how can I add it – without
   microdata there are problems with seo (
 * PS Thank you very much for your work!

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

 *  [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [6 years ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12821716)
 * [@promohunt](https://wordpress.org/support/users/promohunt/) While I haven’t 
   tested the same setup just yet have you tried the suggested solution from the
   below support topic?
    [https://wordpress.org/support/topic/amp-and-youtube-lyte/](https://wordpress.org/support/topic/amp-and-youtube-lyte/)
 *  Thread Starter [promohunt](https://wordpress.org/support/users/promohunt/)
 * (@promohunt)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12842646)
 * Hello James. In that topic, he did not show the video – but I have a video showing
   but does not show microdata.
 *  Thread Starter [promohunt](https://wordpress.org/support/users/promohunt/)
 * (@promohunt)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12843153)
 * Maybe there is some way to transfer the microdata for a videoobject from a regular
   page to amp via hook to functions.php?
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12846467)
 * [@promohunt](https://wordpress.org/support/users/promohunt/) Can you share the
   example microdata output that you’re expecting? Please share the URL to the non-
   AMP page that has the microdata and the corresponding AMP page that lacks it.
 *  Thread Starter [promohunt](https://wordpress.org/support/users/promohunt/)
 * (@promohunt)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12846525)
 * Hello dear Weston. Many thanks
    I’m interested in transferring to amp page VideoObject
   microdata
 * Non amp
    [https://clck.ru/NVwc5](https://clck.ru/NVwc5) Amp [https://clck.ru/NVwcT](https://clck.ru/NVwcT)
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12846556)
 * For reference, the YouTube video with microdata added looks like this:
 *     ```
       <div class="lyte-wrapper" title="ПИОНЫ отцвели - что делать? ОШИБКИ цветоводов" style="width:560px;max-width: 100%;margin:5px auto;">
       	<div class="lyMe" id="WYL_Sl-lpcCYv58" itemprop="video" itemscope itemtype="https://schema.org/VideoObject">
       		<div>
       			<meta itemprop="thumbnailUrl" content="http://vsaduidoma.com/wp-content/plugins/wp-youtube-lyte/lyteThumbs.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FSl-lpcCYv58%2Fhqdefault.jpg"/>
       			<meta itemprop="embedURL" content="https://www.youtube.com/embed/Sl-lpcCYv58"/>
       			<meta itemprop="uploadDate" content="2019-06-18T11:41:50.000Z"/>
       		</div>
       		<div id="lyte_Sl-lpcCYv58" data-src="http://vsaduidoma.com/wp-content/plugins/wp-youtube-lyte/lyteThumbs.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FSl-lpcCYv58%2Fhqdefault.jpg" class="pL">
       			<div class="tC">
       				<div class="tT" itemprop="name">ПИОНЫ отцвели - что делать? ОШИБКИ цветоводов</div>
       			</div>
       			<div class="play"></div>
       			<div class="ctrl">
       				<div class="Lctrl"></div>
       				<div class="Rctrl"></div>
       			</div>
       		</div>
       		<noscript>
       			<!--noindex--><a target="_blank" rel="nofollow" href="http://vsaduidoma.com/goto/http://youtu.be/Sl-lpcCYv58"><img alt="Ошибки при выращивании пионов" src="http://vsaduidoma.com/wp-content/plugins/wp-youtube-lyte/lyteThumbs.php?origThumbUrl=http%3A%2F%2Fi.ytimg.com%2Fvi%2FSl-lpcCYv58%2F0.jpg" alt="" width="560" height="295"/><br/>Watch
       			this video on YouTube</a><!--/noindex--></noscript>
       		<meta itemprop="description" content="Деление ПИОНОВ осенью: ПОШАГОВО: https://youtu.be/W2e7lXDJkGE 12 &quot;ПОЧЕМУ&quot; не цветут ПИОНЫ: https://youtu.be/rqxrGBbjSYc Совсем недавно мы с вами вспоминали наиболее частые причины отсутствия цветения у пионов. И учитывая то, что сам уход за этими цветами не представляет особых хлопот, все же, есть некоторые особенности агротехники, которые, я уверена, будут интересны начинающим цветоводам. Поэтому предлагаю сегодня поговорить о том, как ухаживать за пионами, чем подкармливать растения и когда и как нужно делать обрезку, чтобы они радовали своим цветением каждый год.">
       	</div>
       </div>
       ```
   
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12846567)
 * From looking at the plugin code, it actually has some awareness of generating
   AMP pages. It is checking for `is_amp_endpoint()`. Namely, it is short-circuiting
   on AMP pages.
 * Therefore, I recommend opening an issue on the [plugin’s support forum](https://wordpress.org/support/plugin/wp-youtube-lyte/)
   to request Microdata be added to AMP pages.
 *  Thread Starter [promohunt](https://wordpress.org/support/users/promohunt/)
 * (@promohunt)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12846577)
 * OK thanks for the recommendation. I already contacted the author of the plugin
   through FB. He has not yet decided on amp. Please tell me – how else can you 
   add the markup of a videoobject to amp? Thanks again.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12846644)
 * I’m not an expert on microdata for video, but the easiest way to inject markup
   into YouTube videos on AMP pages would be code like this:
 *     ```
       add_filter(
       	'embed_oembed_html',
       	function ( $html, $url ) {
       		if (
       			function_exists( 'is_amp_endpoint' )
       			&&
       			is_amp_endpoint()
       			&&
       			in_array( wp_parse_url( $url, PHP_URL_HOST ), [ 'youtu.be', 'youtube.com' ], true )
       		) {
       			// @todo Modify $html to add the desired metadata.
       		}
       		return $html;
       	},
       	20,
       	2
       );
       ```
   
 *  Thread Starter [promohunt](https://wordpress.org/support/users/promohunt/)
 * (@promohunt)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12846661)
 * Thank you very much – I will try and write the result

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

The topic ‘AMP and Videoobject microdata’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

 * [microdata](https://wordpress.org/support/topic-tag/microdata/)
 * [VideoObject](https://wordpress.org/support/topic-tag/videoobject/)

 * 10 replies
 * 3 participants
 * Last reply from: [promohunt](https://wordpress.org/support/users/promohunt/)
 * Last activity: [5 years, 12 months ago](https://wordpress.org/support/topic/amp-and-videoobject-microdata/#post-12846661)
 * Status: resolved