DIY وسائل الإعلام الرئيسية الشعار

الموقع النهائي لتصميم وإنشاء مسرح منزلي الخاص ومرحبا فاي الإعداد الخاصة.

2شعار ووردالمقتطفات المنسقة رمز الإصدار 3.x الغموض

I’ve previously written about rich snippets code for أحجية 2. There are also generic instructions and code for the themes twenty eleven, أحب و أطروحة. 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=me”, 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(($تطبيق—>author->get(‘user_url’)) && ($app->author->get(‘user_url’)!== ‘http://)): ?>
<?php _ae(‘Home page:); ?>
<?php endif; ?>

And add the following

<?php if(($تطبيق—>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().'</ا>;

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 تعليقات


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.

غرفترجون سكيف

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 🙂