Google snippets errors - theloopphp code

Latest Reply from Dave at 2015-11-18 06:32:39
I have edit theloop.php file adding entry-title,updated and author values and still got 2 errors on google webmaster tools:
Error: Missing required field "updated".
Error: Missing required hCard "author"

Theme "Gameplay".My current theloop.php code:

global $post, $query_string, $SMTheme;

if (have_posts()) :

if (!isset($_GET['ajaxpage'])) {?> <div class='articles'> <?php }

while (have_posts()) : the_post(); ?>
<div class='one-post'>
<div id="post-<?php the_ID(); ?>" <?php post_class("post-caption"); ?>>
<?php //Title
if (!is_single()&&!is_page()) { ?>
<h2 class='entry-title'><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>" class="post_ttl entry-title"><?php the_title(); ?></a></h2>
<?php } else { ?>
<h1 class='entry-title'><?php the_title(); ?></h1>
<?php }

//Post meta (comments, date, categories)
if (!is_page()) {?><p class='post-meta'>

<span class="post-date date updated"><?php echo get_the_date(); ?></span>,

<?php echo $SMTheme->_('before-category'); ?><?php the_category(', ');

if(comments_open( get_the_ID() )) {
?> | <span class='post-comments'><?php comments_popup_link( $SMTheme->_( 'noresponses' ), $SMTheme->_( 'oneresponse' ), $SMTheme->_( 'multiresponse' ) ); ?></span>
<?php }
edit_post_link( $SMTheme->_( 'edit' ), ' | <span class="edit-link">', '</span>' );
<span class="vcard author"><span class="fn"><?php the_author(); ?></span></span>
</p><?php } ?>

<div class='post-body'>

<?php // Post featured image
if(has_post_thumbnail()) {
if (!is_single()){ ?><a href="<?php the_permalink(); ?>" title="<?php printf( $SMTheme->_( 'permalink' ), the_title_attribute( 'echo=0' ) ); ?>"> <?php }
array("class" => $SMTheme->get( 'layout','imgpos' ) . " featured_image")
if (!is_single()){ ?></a><?php }


//Post content
if (!is_single()&&!is_page()) {
?><a href='<?php the_permalink(); ?>' class='readmore'><?php echo $SMTheme->_( 'readmore' ); ?></a><?php
} else {
wp_link_pages(); ?>
<div class='border'></div>

<?php endwhile; ?>

<?php if (!isset($_GET['ajaxpage'])) {?></div><?php } ?>

<?php endif; ?>

Have you had these errors before the editing of the file?
I have edit this file weeks ago. I know that have to wait for google robot update but I have check it even now and these errors are still there (11.11.2015 date of google checks).
Here is very intelligible instruction on how to optimize your website for search engines:

However, you will need to edit theloop.php file ( or content.php - depends on the theme you are using ).
Well if you would read carfully my first post then maybe you could see that I have allready edit theloop.php file. I have include edited code of that file. Despite this 2 errors which I have describe also on my first post are still there.
LIke I have wrote on 1 post (again) - Im using theme: Gameplay
Actually, we don't provide a support for website optimization for search engines. I've just told you that you are on the right way since you are editing theloop.php and gave you the link to a very clear instruction on how to fix this problem. You may use this instruction or hire a Search Engine Optimization Specialist.

Leave a reply

Add codeAdd image