Google snippets errors - theloopphp code
9 years ago
aduh
Member
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: <?php 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> <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 } the_post_thumbnail( 'post-thumbnail', array("class" => $SMTheme->get( 'layout','imgpos' ) . " featured_image") ); if (!is_single()){ ?></a><?php } } ?> <?php //Post content if (!is_single()&&!is_page()) { smtheme_excerpt('echo=1'); ?><a href='<?php the_permalink(); ?>' class='readmore'><?php echo $SMTheme->_( 'readmore' ); ?></a><?php } else { the_content(''); } wp_link_pages(); ?> <div class='border'></div> </div> </div> <?php endwhile; ?> <?php if (!isset($_GET['ajaxpage'])) {?></div><?php } ?> <?php endif; ?> |
9 years ago
Alice
Support Service
Hi!
Have you had these errors before the editing of the file? |
9 years ago
aduh
Member
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).
|
9 years ago
Alice
Support Service
Hi!
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 ). |
9 years ago
aduh
Member
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 |
9 years ago
Dave
Support Service
Hi!
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
Search by forum
SMThemes.com Support
-
Categories
- Framework
- Themes
- Affiliate Company
- Sponsorship Useful pages
- How to start using our themes
- Contacts