このサイトに加えて、私が持っています 個人のブログ どこ, とりわけ, 私はレシピを投稿する. 私は最近、Googleの新しいレシピ検索を発見した, およびマイクロフォーマットのサポートを実装するために探している / ミクロ. Googleは、チェックインのINGマークアップするためのツールを提供, いわゆる「豊富なスニップ·ペットテストINGツール」. 私は私のレシピの一つを検証してみました場合には, 私は様々なエラーに遭遇しました, which have taken me a while to track down and resolve.
1. 第一の問題は、著者情報とありました / hrecipe section
ソリューション:
あなたは、Googleプロフィールを必要とします. Googleプロフィールは、ページ上のどこからリンクされなければなりません, RELと=「私」, そして、あなたのウェブサイトのメインドメインは、Googleプロフィールへのリンクに記載されている必要があり.
I achieved this with the Mystique theme with a series of modifications.
初めに, 私はからのコードを追加しました ヨースト (以下に示すように) functions.phpへ
function yoast_add_google_profile( $contactmethods ) { // Add Google Profiles $contactmethods['google_profile'] = 'Google Profile URL'; return $contactmethods; } add_filter( 'user_contactmethods', 'yoast_add_google_profile', 10, 1);
二番, I went to my wordpress profile page and filled in the google profile field with a link to my google profile
三番, 私はauthor.phpに行を編集しました, 再び, yoastからの情報に基づいて、, しかし、ミスティークのテーマの変更
in this section
if(($curauth->user_url<>'http://') && ($curauth->user_url<>'')) echo ' '.__('Homepage:','mystique').' <a href="'.$curauth->user_url.'">'.$curauth->user_url.'</a> '; if($curauth->yim<>'') echo ' '.__('Yahoo Messenger:','mystique').' <a href="ymsgr:sendIM?'.$curauth->yim.'">'.$curauth->yim.'</a> '; if($curauth->jabber<>'') echo ' '.__('Jabber/GTalk:','mystique').' <a href="gtalk:chat?jid='.$curauth->jabber.'">'.$curauth->jabber.'</a> '; if($curauth->aim<>'') echo ' '.__('AIM:','mystique').' <a href="aim:goIM?screenname='.$curauth->aim.'">'.$curauth->aim.'</a> ';
この余分な行を追加します。
if(($curauth->user_url<>'http://') && ($curauth->user_url<>'')) echo ' '.__('Homepage:','mystique').' <a href="'.$curauth->user_url.'">'.$curauth->user_url.'</a> '; if($curauth->yim<>'') echo ' '.__('Yahoo Messenger:','mystique').' <a href="ymsgr:sendIM?'.$curauth->yim.'">'.$curauth->yim.'</a> '; if($curauth->jabber<>'') echo ' '.__('Jabber/GTalk:','mystique').' <a href="gtalk:chat?jid='.$curauth->jabber.'">'.$curauth->jabber.'</a> '; if($curauth->aim<>'') echo ' '.__('AIM:','mystique').' <a href="aim:goIM?screenname='.$curauth->aim.'">'.$curauth->aim.'</a> '; if($curauth->google_profile<>'') echo ' <a href="' . $curauth->google_profile . '" rel="me">Google Profile</a> ';
次, 私は自分の著者ページにリンクするのrel =「author」を追加するsingle.phpを編集しました. ミスティークのテーマでは、これはファイルの底部に向かって発見されました, 以内 (長いです) ライン(S) 以下に示すように. 私は「=一部をhrefの前の最初の行の末尾のrel =「author」を追加しました
printf(__('This entry was posted by %1$s on %2$s at %3$s, and is filed under %4$s. Follow any responses to this post through %5$s.', 'mystique'), '<a title="'. sprintf(__(" href="'. get_author_posts_url(get_the_author_meta('ID')) .'" rel="author">'. get_the_author() .'</a>', get_the_time(get_option('date_format')),get_the_time(get_option('time_format')), get_the_category_list(', '), '<a title="RSS 2.0" href="'.get_post_comments_feed_link($post->ID).'">RSS 2.0</a>');echo ' ';
それから, 最終的に行に同じのrel =「author」を追加 670 core.phpのの
これが正しく実装されている場合、あなたは読み込みスニペットテストツールでの成功メッセージを取得する必要があります 確認済み: 著者のマークアップは、このページの正しいです
2. 第二の問題(S) hfeedと一緒にいました / hentry section and included the following:
ミスING必要とhCardの "作者".
ワーニング: 少なくとも1つのフィールドにhCardのために設定する必要があります.
ワーニング: 少なくとも1つのフィールドにHatomEntryのために設定する必要があります.
ワーニング: ミスING必須フィールド "エントリタイトル」.
ワーニング: ミスING必須フィールド」を更新」.
ワーニング: ミスING必要とhCardの "作者".
ソリューション(S):
single.phpを編集するワードプレスのエディタを使用して、
コードを探します
</pre> <h1 class="title"></h1> <pre>
これを置き換えると...
</pre> <h1 class="title entry-title"></h1> <h2 class="updated"></h2> <h2 class="vcard"></h2> <pre>
最後の注意 - ちょうどこのページからコードをコピーして貼り付けないでください, 何らかの理由として、 (私は、文字エンコーディングを推測しています) それは文句を言わない仕事. ここからそれをコピーし、Windowsのメモ帳に貼り付けます. 次に、Windowsのメモ帳からそれを再コピーします (または任意の他の基本的なプレーンテキストのみのエディタ) そして、wordpressのエディタに貼り付けます. メモ帳を経由するコードは、あることが想定されるプレーンテキストとして扱われるので、問題を引き起こす任意の隠された符号化又は他のデータを失います
どう思いますか? 私たちは以下のコメントをドロップ! あなたが購読したい場合は、右上のメニューで購読リンクをご利用ください. また、下記の社会的なリンクを使用してお友達とこれを共有することができます. 乾杯.
返信を残す