Featured Video Plus
[resolved] Trying to echo get_the_post_video_url but no luck (2 posts)

  1. Native Imaging
    Posted 2 years ago #

    My apologies for poor php skills..

    I'm trying to echo the video url like this: (for better schema & Google Rich Snippets)

    <meta itemprop="embedUrl" content="<?php echo get_the_post_video_url(); ?> />

    any help would be greatly appreciated! :)


  2. Native Imaging
    Posted 2 years ago #

    Aha, I figured it out.
    incase any one else needs this snippet here's what I used. I used it for Schema, so if you want it to register on search engines, be sure to wrap it with <div itemscope="itemscope" itemtype="VideoObject">

    <?php if (function_exists('has_post_video') ) :
                        $post_id = get_the_post_video_url( $post_id ); { ?>
                    <meta itemprop="embedUrl" content="<?php echo $post_id; ?>" />
                <?php } endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Featured Video Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.