Frequently Asked Questions

Quick Jump:

  1. Why don’t the scheduler events trigger? Nothing is happening.
  2. Can I turn off WP-Cron and use server cron jobs instead?
  3. I’m seeing the message “Error: [plugin] hook not found, likely another plugin misuse of cron_schedules. See FAQ.” What is that?
  4. Why does the Scheduler use hours? Why can’t I query every X minutes or seconds?
  5. I’m doing a query on a channel full of content but not getting any results. Why?
  6. How do I get YouTube videos to autoplay? autohide? not showinfo? remove control bar? etc.
  7. How can I use schema.org microdata for the videos?
  8. How can I use a different video player?
  9. Why am I seeing the YouTube message ‘Watch this video on YouTube’?
  10. How can I convert VideoDuration into other formats?
  11. I’m getting strange characters when I save my feeds. What is it?
  12. How can I support WordPress Video Gallery?

  1. Why don’t the scheduler events trigger? Nothing is happening.

    • The plugin hooks into the WordPress WP-Cron for scheduling. These cron events are only checked when a visitor loads any WordPress page on the site. If there are no visitors, there can be no cron checks and therefore no scheduler checks.
    • If you are using a caching plugin, WP-Cron won’t be called until a cached page is rebuilt.
    • If you are using .htaccess to allow,deny by IP, make sure to allow the IP of your WordPress site itself as the WP-Cron uses that IP address.
  2. Can I turn off WP-Cron and use server cron jobs instead?

    • Yes, if you have a traffic site over 300 visitors per day this may be a better solution.
      1. Edit /wp-config.php and add the line
        define('DISABLE_WP_CRON', true);
      2. Edit your cron on the server via the command line with ‘crontab -e’ or administration panel and add the line
        */5 * * * * wget -q -O -"http://www.mydomain.com/wp-cron.php?doing_wp_cron=`date +\%s`" > /dev/null2>&1

        and change ‘mydomain’ to your site domain.

      This crontab entry will call wp_cron.php every 5 minutes and trigger any scheduled action hooks.

      If you are unfamiliar with cronjobs and/or are unable to edit your server’s cron you may use a web based cron service such as EasyCron.

  3. I’m seeing the message “Error: [plugin] hook not found, likely another plugin misuse of cron_schedules. See FAQ.” What is that?

    • This happens when another plugin incorrectly replaces cron_schedules with their own schedules instead of correctly adding to the existing schedules. This means the other plugin actually wipes out all existing cron hooks set by WordPress and plugins, including our plugin hook. The offending plugin code needs to be fixed or deactivated. I’ve only seen this happen with two other plugins – 1 was fixed and the other is no longer supported (php my video blog), but there are many many plugins out there. The chances of seeing this are slim, but if you do see this message, please let me know the offending plugin.
  4. Why does the Scheduler use hours? Why can’t I query every X minutes or seconds?

    • The various video sites have daily quotas and/or throttling, so it’s best to request 100 videos an hour than it is 1 video a minute. If you want to publish the posts at that frequency, save them in bulk as Drafts and use the free plugin Auto Post Scheduler.
  5. I’m doing a query on a channel full of content but not getting any results. Why?

    • The plugin queries the API for any videos attached to the channel. If the channel is only composed of playlists of videos, the API will return no video results.
  6. How do I get YouTube videos to autoplay? autohide? not showinfo? not show control bar? etc.

    • Currently, the oEmbed format does not support these options (boo). You can choose to use another video player that does, use iframe in your post content template instead of the embed shortcode, or use a WordPress filter to add the options to oEmbed.

       

    • Example post content template using iframe instead of embed shortcode:

      // use any or all of the additional options
      <p style='text-align:center;'><iframe width="640" height="480" src="https://www.youtube.com/embed/%VideoID%?autoplay=1&autohide=1&showinfo=0&controls=0" frameborder="0" allowfullscreen></iframe></p>
      
    • Example WordPress filter code you would add to your theme’s functions.php file:

      function embed_responsive_options($code){
          if(strpos($code, 'youtu.be') !== false || strpos($code, 'youtube.com') !== false){
              // use any or all of the additional options
              $return = preg_replace('@embed/([^"&]*)@', 'embed/$1&autoplay=1&autohide=1&showinfo=0&controls=0', $code);
              return '<div class="embed-container">' . $return . '</div>';
          }
          return '<div class="embed-container">' . $code . '</div>';
      }
      
      add_filter( 'embed_oembed_html', 'embed_responsive_options');
      
    • Click here for a full list of YouTube embed parameters.
  7. How can I use schema.org microdata for the videos?

    • We can add this right into the Post Content Template for the video feed. Here is an example:
      <div itemscope itemtype='http://schema.org/VideoObject'>
      <meta itemprop='name' content='%VideoTitle%'><meta itemprop='thumbnailURL' content='%VideoImage%'><meta itemprop='embedURL' content='%VideoUrl%'><meta itemprop='width' content='640'><meta itemprop='height' content='480'>
      <p style='text-align:center;'>[embed width='640' height='480']%VideoUrl%[/embed]</p>
      <p><span itemprop='description'>%VideoDescription%</span></p>
      </div>
      

  8. How can I use a different video player?

    • YouTube allows other video players to show their content but most other sites do not. That said, once your chosen video player is installed on your site, you can simply replace the shortcode in the Post Title Template with the shortcode for the new video player.

      Example: After installing the JW Player plugin, you would edit the Post Title Template to replace

      [embed width='640' height='480']%VideoUrl%[/embed]
      

      with

      [jwplayer width='640' height='480' file='%VideoUrl%']
      

      Using a custom player typically supports a much wider range of options, for example see JW Player Options.

  9. Why am I seeing the YouTube message ‘Watch this video on YouTube’?

    notEmbeddable

    • Normally the plugin will only import videos that are flagged as embeddable on other websites besides YouTube, but you can override this by specifically importing a video by its video ID so you can edit the video details in your post as needed. If you leave in the embed code for a video YouTube does not allow to be embedded on other sites, then this message will appear instead.
  10. How can I convert VideoDuration into other formats?

    • You can attach an action to when the VideoDuration post meta is added and perform your conversion. For instance the following code should be added to your theme’s functions.php file if you want to convert the VideoDuration from HH:MM:SS into just seconds and save it under the post meta key ‘VideoSeconds’:
      function video_duration_convert( $meta_id, $post_id, $meta_key, $meta_value ) {
              if ( 'VideoDuration' == $meta_key ) {
                      sscanf($meta_value, "%d:%d:%d", $hours, $minutes, $seconds);
                      $secs = isset($seconds) ? $hours * 3600 + $minutes * 60 + $seconds : $hours * 60 + $minutes;
                      add_post_meta( $post_id, 'VideoSeconds', $secs );
              }
      }
      
      add_action('added_post_meta', 'video_duration_convert', 10, 4);
  11. I’m getting strange characters when I save my feeds. What is it?

    charset

    • This might happen on older PHP versions that are not using the UTF-8 charset (default since PHP 5.4). You can either upgrade to a supported PHP version or modify your PHP .ini file to set the default_charset to UTF-8.