DIY میڈیا ہوم علامت

اپنے گھر تھیٹر اور ہائی فائی سیٹ اپ کے ڈیزائن اور پیدا کرنے کے لئے الٹی سائٹ.

2ورڈپریس علامتmystique کے 3.x کے لئے امیر کے ٹکڑوں کا کوڈ

I’ve previously written about rich snippets code for mystique کے 2. There are also generic instructions and code for the themes twenty eleven, me gusta اور مقالہ. Below is updated code for Mystique 3

1. The first problem was with the author information / hrecipe section


You need a google profile. Your google profile must be linked from somewhere on the page, with rel=”مجھے”, AND the main domain of your website must be listed on your google profile links.

I achieved this with the Mystique theme with a series of modifications.

اولا, I added the code from Yoast کی (as shown below) to 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);

Second, I went to my wordpress profile page and filled in the google profile field with a link to my google profile

تیسرے, I edited a line to author.php, پھر, based on information from yoast, but changed for the Mystique theme

<?php if(($app--->author->get('user_url')) && ($app->author->get('user_url')!== 'http://')): ?>
  <?php _ae('Home page:'); ?>
<?php endif; ?>

And add the following

<?php if(($app--->author->get('google_profile')) && ($app->author->get('google_profile')!== 'http://')): ?>
  <?php _ae('Google Profile:'); ?>
<?php endif; ?>

Then I edited AtomObjectAuthor.php and changed line 213 by adding rel=”مصنف” so it reads as follows

return '<a title="'.$title.' " href="'.$this->getPostsURL().'" rel="author">'.$this->getName().'</a>';

When this is correctly implemented you should get a success message in the snippets testing tool which reads Verified: Authorship markup is correct for this page

2. The second problem(ے) were with the hfeed / hentry section and included the following:

Missing required hCard “مصنف”.
انتباہ: کم از کم ایک میدان Hcard کے لئے مقرر کیا جانا چاہیے.
انتباہ: کم از کم ایک میدان HatomEntry کے لئے مقرر کیا جانا چاہیے.
انتباہ: لاپتہ مطلوبہ فیلڈ “داخلے کی عنوان”.
انتباہ: لاپتہ مطلوبہ فیلڈ “اپ ڈیٹ”.
انتباہ: Missing required hCard “مصنف”.


Use the wordpress editor to edit single.php

Find the code

<h1 class="title"></h1>

replace this with

<h1 class="title entry-title"></h1>
<h2 class="updated"></h2>
<h2 class="vcard"></h2>

A final noteDon’t just copy and paste the code from this page, as for some reason (I’m guessing character encoding) it wont work. Copy it from here and paste into windows notepad. Then re-copy it from windows notepad (or any other basic plain-text-only editor) and paste into the wordpress editor. Going via notepad loses any hidden encoding or other data which causes a problem so the code is treated as the plain-text it is supposed to be!

اپنے آپ سے کچھ خیالات کو مل گیا? تبصرہ کی طرف سے ذیل میں اپنے آپ کو ملوث! آپ کے سبسکرائب کرنا چاہتے ہیں تو سب سے اوپر دائیں مینو پر لنک سبسکرائب استعمال کریں. آپ بھی ذیل سماجی روابط کا استعمال کرتے ہوئے کی طرف سے اپنے دوستوں کے ساتھ اس کا اشتراک کر سکتے ہیں. چیرس.

جواب چھوڑیں

2 تبصرے

Gravatar کےروب

Is there an update for this since the code is so much different now using the atom engine?
I have tried to possibly add the code with the atom calls but I am just a little unsure of how to get this to work properly.

جواب دیں
Gravatar کےجان Scaife

Not yet as this code still works. تاہم, I will be doing an update of it all in the near futureonce the issues associated with the migration of the site have been resolved 🙂 Check back in 3-4 weeks 🙂

جواب دیں