Google XML Sitemap for Videos - Version 2.0.1

Version Description

Download this release

Release Info

Developer labnol
Plugin Icon wp plugin Google XML Sitemap for Videos
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0 to 2.0.1

Files changed (2) hide show
  1. readme.txt +8 -4
  2. video-sitemap.php +5 -5
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: labnol
3
Tags: youtube, xml sitemaps, google sitemaps, bing, videos, seo, search engines, sitemap
4
Requires at least: 2.9.2
5
Tested up to: 3.0
6
- Stable tag: 2.0
7
8
This plugin will help you generate Google Video Sitemaps (XML) for your WordPress blog.
9
@@ -17,7 +17,11 @@ Your Video Sitemap will includes web pages which embed videos from YouTube or wh
17
18
**Related links:**
19
20
- You can follow [Digital Inspiration](http://www.labnol.org/ "Technology Blog") on [Twitter](http://twitter.com/labnol) and [Facebook](http://www.facebook.com/digital.inspiration).
21
22
== Installation ==
23
@@ -33,7 +37,7 @@ Here's how you can install the plugin:
33
34
= How can I submit my video sitemap to Google? =
35
36
- Once you have created your Sitemap, you can submit it to Google using Webmaster Tools. Google don't guarantee that all videos included in a Sitemap will appear in our search results, or that we will use all the video information included in your Sitemap.
37
38
= Should I check the "include video duration" option when generating the sitemap? =
39
@@ -41,7 +45,7 @@ If you have a *small number of videos* on your website, you may check this optio
41
42
= Where's the sitemap file stored? =
43
44
- You can find the video-sitemap.xml file in your blog's root folder.
45
46
= Can I block search engines from indexing pages that are in the XML Sitemap file? =
47
3
Tags: youtube, xml sitemaps, google sitemaps, bing, videos, seo, search engines, sitemap
4
Requires at least: 2.9.2
5
Tested up to: 3.0
6
+ Stable tag: 2.0.1
7
8
This plugin will help you generate Google Video Sitemaps (XML) for your WordPress blog.
9
17
18
**Related links:**
19
20
+ * [Google XML Sitemap for Mobile](http://wordpress.org/extend/plugins/google-mobile-sitemap/)
21
+ * [Google XML Sitemap for Images](http://wordpress.org/extend/plugins/google-image-sitemap/)
22
+ * [Must have WordPress Plug-ins](http://www.labnol.org/software/must-have-wordpress-plugins/14034/) on [Digital Inspiration](http://www.labnol.org/ "Technology Blog")
23
+
24
+ For updates, you can follow the [author](http://www.labnol.org/about/ "Amit Agarwal") on [Twitter](http://twitter.com/labnol) and [Facebook](http://www.facebook.com/digital.inspiration).
25
26
== Installation ==
27
37
38
= How can I submit my video sitemap to Google? =
39
40
+ Once you have created your Sitemap, you can submit it to Google using Webmaster Tools. Google don't guarantee that all videos included in a Sitemap will appear in our search results.
41
42
= Should I check the "include video duration" option when generating the sitemap? =
43
45
46
= Where's the sitemap file stored? =
47
48
+ You can find the sitemap-video.xml file in your blog's root folder.
49
50
= Can I block search engines from indexing pages that are in the XML Sitemap file? =
51
video-sitemap.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google XML Sitemap for Videos
4
Plugin URI: http://www.labnol.org/software/xml-video-sitemaps-for-google/14085/
5
Description: This plugin will generate a XML Video Sitemap for your WordPress blog. Open the <a href="tools.php?page=video-sitemap-generate-page">settings page</a> to create your video sitemap.
6
Author: Amit Agarwal
7
- Version: 2.0
8
Author URI: http://www.labnol.org/
9
*/
10
@@ -27,7 +27,7 @@ function video_sitemap_generate () {
27
<iframe src="http://www.facebook.com/plugins/likebox.php?id=5791561181&amp;width=250&amp;height=260&amp;connections=8&amp;stream=false&amp;header=false" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:250px; height:260px"></iframe>
28
</div>
29
<h2>XML Sitemap for Videos</h2>
30
- <?php $sitemapurl = get_bloginfo('url') . "/video-sitemap.xml"; ?>
31
<p>The XML Sitemap was generated successfully. Please open the <a target="_blank" href="<?php echo $sitemapurl; ?>">Sitemap file</a> in your favorite web browser to confirm that there are no errors.</p>
32
<p>You can submit your Video XML Sitemap through <a href="http://www.google.com/webmasters/tools/" target="_blank">Webmaster Tools</a> or you can directly <a target="_blank" href="http://www.google.com/webmasters/sitemaps/ping?sitemap=<?php echo $sitemapurl; ?>">ping Google</a>.</p>
33
<h3>Suggestions?</h3>
@@ -55,10 +55,10 @@ function video_sitemap_generate () {
55
function video_sitemap_loop () {
56
global $wpdb;
57
58
- $posts = $wpdb->get_results ("SELECT id, post_title, post_content, post_date_gmt, guid, post_excerpt
59
FROM $wpdb->posts
60
WHERE post_status = 'publish'
61
- AND post_type = 'post'
62
AND post_content LIKE '%youtube.com%'
63
ORDER BY post_date DESC");
64
@@ -119,7 +119,7 @@ function video_sitemap_loop () {
119
$xml .= "\n</urlset>";
120
}
121
122
- $video_sitemap_url = $_SERVER["DOCUMENT_ROOT"] . '/video-sitemap.xml';
123
file_put_contents ($video_sitemap_url, $xml);
124
125
}
4
Plugin URI: http://www.labnol.org/software/xml-video-sitemaps-for-google/14085/
5
Description: This plugin will generate a XML Video Sitemap for your WordPress blog. Open the <a href="tools.php?page=video-sitemap-generate-page">settings page</a> to create your video sitemap.
6
Author: Amit Agarwal
7
+ Version: 2.0.1
8
Author URI: http://www.labnol.org/
9
*/
10
27
<iframe src="http://www.facebook.com/plugins/likebox.php?id=5791561181&amp;width=250&amp;height=260&amp;connections=8&amp;stream=false&amp;header=false" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:250px; height:260px"></iframe>
28
</div>
29
<h2>XML Sitemap for Videos</h2>
30
+ <?php $sitemapurl = get_bloginfo('url') . "/sitemap-video.xml"; ?>
31
<p>The XML Sitemap was generated successfully. Please open the <a target="_blank" href="<?php echo $sitemapurl; ?>">Sitemap file</a> in your favorite web browser to confirm that there are no errors.</p>
32
<p>You can submit your Video XML Sitemap through <a href="http://www.google.com/webmasters/tools/" target="_blank">Webmaster Tools</a> or you can directly <a target="_blank" href="http://www.google.com/webmasters/sitemaps/ping?sitemap=<?php echo $sitemapurl; ?>">ping Google</a>.</p>
33
<h3>Suggestions?</h3>
55
function video_sitemap_loop () {
56
global $wpdb;
57
58
+ $posts = $wpdb->get_results ("SELECT id, post_title, post_content, post_date_gmt, post_excerpt
59
FROM $wpdb->posts
60
WHERE post_status = 'publish'
61
+ AND (post_type = 'post' OR post_type = 'page')
62
AND post_content LIKE '%youtube.com%'
63
ORDER BY post_date DESC");
64
119
$xml .= "\n</urlset>";
120
}
121
122
+ $video_sitemap_url = $_SERVER["DOCUMENT_ROOT"] . '/sitemap-video.xml';
123
file_put_contents ($video_sitemap_url, $xml);
124
125
}