webmaster Tools showing 50 errors

Dedicated support forum for CloudHost elegant bosting WordPress theme which is perfect for your business and hosting websites. Here you can ask questions and discuss with other theme users.
GK User
Wed Dec 25, 2013 7:25 pm
I recently logged into Google Webmaster only to suddenly find over 50 errors:

Missing: author
Missing: entry-title
Missing: updated

This is for each post. I found a forum saying the fix would be:

The simple solution for this is located in single.php

<h1 class="entry-title"><?php the_title(); ?></h1>
search for the_title and enclose it into a span tag like above.

However, I cannot find this in single.php Are you able to point me in the right direction

teambuilding-bangkok.com

Regards

Toni

Capture.JPG
User avatar
Expert Boarder

GK User
Fri Dec 27, 2013 9:41 am
Hello,

The single.php file loads content.php and content-*.php files depending from the content type. Of course you can edit the headings in one place - file layouts/content.post.header.php is loaded in all content-* files. The header is generated by this fragment:

Code: Select all
<h<?php echo (is_singular()) ? '1' : '2'; ?>>
        <?php if(!is_singular()) : ?>
        <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', GKTPLNAME ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
        <?php endif; ?>
                <?php the_title(); ?>
        <?php if(!is_singular()) : ?>
        </a>
        <?php endif; ?>
       
        <?php if(is_sticky()) : ?>
        <sup>
                <?php _e( 'Featured', GKTPLNAME ); ?>
        </sup>
        <?php endif; ?>
</h<?php echo (is_singular()) ? '1' : '2'; ?>>


so you will have to change:

Code: Select all
<h<?php echo (is_singular()) ? '1' : '2'; ?>>


to:

Code: Select all
<h<?php echo (is_singular()) ? '1' : '2'; ?> class="entry-title">


The post meta data are generated in the gk_post_meta function in this file: gavern/helpers/helpers.layout.fragments.php
User avatar
Administrator

GK User
Fri Dec 27, 2013 6:25 pm
Thank you Dziudek

Appreciate your professional support as always. This worked perfectly for the title. My apologies as I don't quite understand the last sentence: The post meta data are generated in the gk_post_meta function

Could you possible let me know what I change from - to ..

I assume it would be for the last 2 errors as:

Error: Missing required field "updated".
Error: Missing required hCard "author".

Regards

Toni
User avatar
Expert Boarder

GK User
Sat Dec 28, 2013 10:54 am
OK, in this case please open file gavern/helpers/helpers.layout.fragments.php and in function gk_post_meta please change:

Code: Select all
<?php if($param_date) : ?>
                         <li class="date-mobile">
                                 <time class="entry-date" datetime="<?php echo esc_attr(get_the_date(DATE_W3C)); ?>">
                                         <?php echo esc_html(get_the_date('j F, Y')); ?>
                                 </time>
                         </li>
                         <?php endif; ?>


to:

Code: Select all
<?php if($param_date) : ?>
                         <li class="date-mobile">
                                 <time class="entry-date date updated" datetime="<?php echo esc_attr(get_the_date(DATE_W3C)); ?>">
                                         <?php echo esc_html(get_the_date('j F, Y')); ?>
                                 </time>
                         </li>
                         <?php endif; ?>


and please replace:

Code: Select all
<?php if($param_author) : ?>
                                 <li>
                                         <?php _e('Written by ', GKTPLNAME); ?>
                                         <a class="url fn n" href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" title="<?php echo esc_attr(sprintf(__('View all posts by %s', GKTPLNAME), get_the_author())); ?>" rel="author"><?php echo get_the_author(); ?></a>
                                 </li>
                                 <?php endif; ?>


to:

Code: Select all
<?php if($param_author) : ?>
                                 <li class="vcard author">
                                         <?php _e('Written by ', GKTPLNAME); ?>
                                         <a class="url fn n" href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" title="<?php echo esc_attr(sprintf(__('View all posts by %s', GKTPLNAME), get_the_author())); ?>" rel="author"><?php echo get_the_author(); ?></a>
                                 </li>
                                 <?php endif; ?>


my solution is based on this entry: http://nepallica.com/fix-google-rich-sn ... wordpress/

We will include this kind of improvements in the next update :)
User avatar
Administrator

GK User
Sat Dec 28, 2013 3:50 pm
Fantastic. This is the first time I have had zero errors with Google webmaster thanks to your support!

Thank you once again and this post is SOLVED ;)

Regards

Toni
User avatar
Expert Boarder


cron