どうせなら携帯版のgoogle検索でも表示されて欲しいなーと思ってちょっと調べてみた。
Google Sitemap Generator(Xml Sitemap Generator)というWordpressのプラグインを使ってsitemap.xmlを作成していた。
このプラグインを少々改造することでモバイル検索対応とすることができるらしい(携帯用のgoogleのロボット検索が携帯用サイトとして認識してくれる)
手順は以下の通り。
なお、Google Sitemap Generatorプラグインは導入済みであることが前提。
- 修正対象ファイルは一つ →[WordpressのHOME]/wp-content/plugins/google-sitemap-generator/sitemap-core.php
- 523ステップ目あたりに以下を追加
- 1784ステップ目あたりに以下の要素を追加
- 管理者画面のXML-Sitemapからsitemap.xmlを再構築する
- 念のため、googleウェブマスターツールでsitemap.xmlの再送信を行う →記入ミスなどがあったら×印で教えてくれます。
if($this->_priority!==false && $this->_priority!=="") $r.= "\t\t
" . number_format($this->_priority,1) . "\n";$r.= “\t\t<mobile:mobile/>”;
$r.= “\n\t</url>\n”;
return $r;
$this->AddElement(new GoogleSitemapGeneratorXmlEntry('<urlset xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'));※該当箇所は「urlset」をキーに検索をかけるとすぐに見つかります。
googleウェブマスターツールって何じゃそれ?って方はググれカs(ry
嘘ですごめんなさいm(_ _)m
この辺の記事をご覧になると良く分かると思います。
でも実際使ってみるのが一番ですが!
関連するかもしれない記事
- TODO WordPressにおける各ブログ検索対策
- WordPress プラグイン mixiへの同時投稿
- WordPress -My Category Orderプラグイン導入
- WordPress -最新のエントリーに投稿日付を表示する
- WordPress yahooブログ検索とgooブログ検索にインデックスさせる
他のブログも読む



One Response
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Continuing the Discussion