DIY मीडिया होम लोगो

अपनी खुद की होम थिएटर और हाय-Fi सेटअप डिजाइन और बनाने के लिए परम साइट.

22Wordpress लोगोथीसिस थीम के लिए रिच स्निपेट्स कोड

In response to a query by Darko Kovan­cives on my pre­vi­ous art­icle aboutfix­ing Rich Snip­pets code for the Mys­tique theme we have resolved the same issues with the Thes­is theme. Details of the changes required are below.

Before the file edits you need to carry out vari­ous oth­er changes and tasks

  1. Get a google pro­file (अर्थात. a google+ account)
  2. Add the address of your site (उदा.. hTTPS:// to your google+ pro­file, as a pub­lic link
  3. Get your google plus ID and use it in place of mine in file edit num­ber 5 below
  4. Change a Thes­is set­ting for show­ing author on teas­ers in the options — Thes­is: Design Options: Teas­ers: Teas­er Dis­play Options: Tick “author name”
  5. Change a Thes­is set­ting for link­ing author in options — Thes­is: Design Options: Dis­play Options: Bylines: “Link author names to archives”

Now do the file edits as follows

1. Edit line 151 in content.php to nest the fn span inside a vcard span


[php htmlscript=“1”]echo __(‘by’, ‘thes­is’) . " <span class=\“author vcard$fn\”>$लेखक</विस्तार>";[/PHP]


[php htmlscript=“1”]echo __(‘by’, ‘thes­is’) . " <span class=\“vcard\”><span class=\“author $fn\”>$लेखक</विस्तार></विस्तार>";[/PHP]

2. Edit line 114 in content.php to provide updated date as well as pub­lished date


[php htmlscript=“1”]अगर ($तारीख)
echo ‘<abbr class=“published” title=“ ‘ . get_the_time(‘Y‑m-d’) . ’ ”> . get_the_time(get_option(‘date_format’)) . </abbr>;[/PHP]


[php htmlscript=“1”]अगर ($तारीख){
echo ‘<abbr class=“published” title=“ ‘ . get_the_time(‘Y‑m-d’) . ’ ”> . get_the_time(get_option(‘date_format’)) . </abbr>. अद्यतित <abbr class=“updated” title=“ ‘ . get_the_modified_time(‘Y‑m-d’) . ’ ”> . get_the_modified_time(get_option(‘date_format’)) . </abbr>;
echo ‘<abbr class=“published updated” title=“ ‘ . get_the_time(‘Y‑m-d’) . ’ ”> . get_the_time(get_option(‘date_format’)) . </abbr>;

3. Edit line 81 in teasers.php to include updated date


[php htmlscript=“1”]echo ‘<abbr class=“teaser_date pub­lished” title=“ ‘ . get_the_time(‘Y‑m-d’) . ’ ”> . get_the_time($use_format) . "</abbr>\n”;[/PHP]


[php htmlscript=“1”]अगर(get_the_date()!=get_the_modified_date()) echo ‘<abbr class=“teaser_date pub­lished” title=“ ‘ . get_the_time(‘Y‑m-d’) . ’ ”> . get_the_time($use_format) . </abbr><abbr class=“teaser_date updated” title=“ ‘ . get_the_modified_time(‘Y‑m-d’) . ’ ”><span class=“value-title” title=“ ‘.get_the_modified_time($use_format).’ ”></विस्तार></abbr>’.”\n”;
else echo ‘<abbr class=“teaser_date pub­lished updated” title=“ ‘ . get_the_time(‘Y‑m-d’) . ’ ”> . get_the_time($use_format) . "</abbr>\n”;[/PHP]

4. Edit the author href code on line 144 of content.php to add rel=“me”


[php htmlscript=“1”]$author = ‘<a href=“ ‘ . get_author_posts_url(get_the_author_ID()) . ’ ” class=“url fn“ ‘ . $nofol­low .’> . get_the_author() . </ए>;[/PHP]


[php htmlscript=“1”]$author = ‘<a rel=“me” href=“ ‘ . get_author_posts_url(get_the_author_ID()) . ’ ” class=“url fn“ ‘ . $nofol­low .’> . get_the_author() . </ए>;[/PHP]

5. Edit line 308 in content.php to insert google account link


[php htmlscript=“1”]$output .= “$tab\t<h1>" . apply_filters(‘thesis_archive_intro_headline’, get_author_name($wp_query->query_vars[‘author’])) . "</h1>\n”; #wp[/PHP]


[php htmlscript=“1”]$output .= “$tab\t<h1><a rel=\“me\” href=\“\”>" . apply_filters(‘thesis_archive_intro_headline’, get_author_name($wp_query->query_vars[‘author’])) . "</ए></h1>\n”; #wp[/PHP]

लगता है कि हम कुछ नहीं छूटा है? हमें नीचे टिप्पणी से पता करते हैं. आप सदस्यता के लिए चाहते हैं, तो ऊपर दाईं ओर मेनू पर लिंक का उपयोग करें सदस्यता लें. आप नीचे दिए गए सामाजिक लिंक का उपयोग करके अपने दोस्तों के साथ इस साझा कर सकते हैं. चियर्स.

उत्तर छोड़ दें

22 टिप्पणियाँ

gravatar/usr/share/hassio/homeassistant/.storage का उपयोग करें मैंने सफलतापूर्वक हटा दिया है

very help­ful web­site. it is big use­ful for us. /usr/share/hassio/homeassistant/.storage का उपयोग करें मैंने सफलतापूर्वक हटा दिया है.

जवाब दें

Thanks Jon. Bril­liant fix. The Thes­is’ hcard errors cleaned up nicely.
We are hav­ing a related issue which maybe you’ll know the answer for. We have a some cod­ing gen­er­at­ing the hrecipe format­ting and can see the markups when inspect­ing the post ele­ments, but the rich snip­pet tool isn’t pick­ing it up at all. The developer has no prob­lems get­ting picked up on her site and oth­ers she has built out, but for some reas­on it isn’t get­ting picked up on a Thes­is theme.

Don’t know if this is in your round­house, but if you could take a look that would be awesome.

Here is a post of ours with the markup: Roas­ted Straw­berry Muffin
Here is one of hers with the markup: Apple­sauce Muffins

Thanks again for the pre­vi­ous fix and for any help you can offer.

जवाब दें
gravatarजॉन Scaife

I think you’ve mixed up your rel=“me” and rel=“author” tags a bit

You should only have a single rel=“me” link — from your author page to your google pro­file. every­where else you should have rel=“author” tags. On your homepage each post has a “by Wouter de Jong” link which points (सही ढंग से) to your author page ), but you have rel=“me” on these links. It should be rel=“author”

Once you change these rel=“me” links into rel=“author” I think it will all work — as it stands you’ve got mul­tiple rel=“me” links on your author page, most of them back to itself and only 1 (सही ढंग से) point­ing to your google pro­file. I think this is con­fus­ing the snip­pet tool

जवाब दें

हाय जॉन, it worked per­fectly — I did­n’t include items 4 तथा 5 from your list as they are not essen­tial to val­id­ate the rich snip­pet and I’m not bet­ting on Google+ just yet so I don’t want to “lit­ter” my themes 🙂

Thanks for the tip 🙂

जवाब दें

i did this exactly. after doing this my Author­ship markup got veri­fied but unfor­tu­nately I’m get­ting below errors .

चेतावनी दें आईएनजी: मिस आईएनजी आवश्यक क्षेत्र "अपडेट".
चेतावनी दें आईएनजी: कम से कम एक क्षेत्र Hcard के लिए सेट किया जाना चाहिए.
चेतावनी दें आईएनजी: Miss­ing required field “name (fn)".

do i have to wait for few days for crawling?

जवाब दें
gravatarजॉन Scaife

Sorry — my fault. I’ve figured it out. The code had got mangled by word­press. I think when I update the post word­press pro­cesses some of the code and takes some of the classes out which makes it dis­func­tion­al. I’ve cor­rec­ted it. Please give it a try now.

जवाब दें
gravatarEko Y

धन्यवाद, very use­ful info. But, how to add meta tags inform­a­tion like this blog? It looks if i do right click in browser » view page info. There are many inform­a­tion on gen­er­al tab. Like Author, View­port Etc. My blog is just con­tain : con­tent, robots, descrip­tions, keywords in page info..How to get this snippet?
Thank You..

जवाब दें
gravatarजॉन Scaife

Most of that comes from using a semant­ic HTML5 theme for word­press com­bined with the Yoast इस plu जिन. I also have vari­ous meta files like humans.txt and robots.txt. Have a look at the word­press guide for loads of inform­a­tion about improv­ing your word­press setup.

जवाब दें