• Resolved babyalpha

    (@babyalpha)


    My blog faces the problem of warnings in Google rich snippet tool after using MH theme and I’m not sure if it’s about the search engine ranking. Here are the warning listed at Google rich snippet tool :

    Warning: Missing required field “entry-title”.
    Warning: Missing required field “updated”.
    Warning: Missing required hCard “author”.

    I search the solution and many bloggers said it can be fixed with revising the single.php. Here is one the of posts: https://www.makeuseof.com/tag/add-rich-snippets-reviews-wordpress-blog/

    However, I cannot find the related “the_title()” at single.php. Please advise how I can fix the warning at MH Theme. Thanks so much!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello babyalpha,

    thanks for downloading the theme.

    Please note that MH Magazine lite does not support any rich snippets by default. So you will have to use a plugin or customize the theme.

    If you are looking for “the_title()”, you can find it in content.php on line 8. We can’t provide free support for any theme customizations, so please modify the code only if you know what you are doing, otherwise you might break the theme.

    The premium version of MH Magazine does support Google Authorship. There you just have to add the URL of your Google+ profile and the theme will link automatically to your Google+ profile and enable Google Authorship: https://www.mhthemes.com/themes/mh/magazine/

    Regards
    Michael

    Please replace line 7 until line 13 in content.php with this:

    <header class="post-header">
    	<h1 class="entry-title"><?php the_title(); ?></h1>
    	<?php if (get_post_meta($post->ID, "mh-subheading", true)) : ?>
    	<h2 class="subheading"><?php echo esc_attr(get_post_meta($post->ID, "mh-subheading", true)); ?></h2>
    	<?php endif; ?>
    	<p class="meta post-meta"><?php _e('Posted on ', 'mh'); ?><span class="updated"><?php the_date(); ?></span><?php _e(' by ', 'mh'); ?><span class="vcard author"><span class="fn"><?php the_author_posts_link(); ?></span></span><?php _e(' in ', 'mh') . the_category(', ') ?>  //  <?php comments_number(__('0 Comments', 'mh'), __('1 Comment', 'mh'), __('% Comments', 'mh'));?></p>
    </header>

    This will provide all missing structured data. ??

    And then please rename .post-title on line 167 in style.css in .entry-title

    Thread Starter babyalpha

    (@babyalpha)

    Thanks so much!

    I’ve just revised content.php and style.css but all of the three warning still exist. Would you advise any solution and will it affect SEO in google?

    Thanks so much for your assistance!

    Hi,

    the code is tested and will work for sure, if implemented properly.

    If you have done it like I said, please test again an article with the rich snippet testing tool and you’ll see that all structured data is provided.

    Even if you do not implement it, this will have no negative seo effect. Instead you should focus on creating amazing content. In the end, that is what really counts for search engines… ??

    Regards
    Michael

    Thread Starter babyalpha

    (@babyalpha)

    Thanks so much for your advise.

    However, I implemented properly but still show the warnings at rich snippet testing tool. Not sure if there is any reasons from google. Anyway, still thanks for your help! =)

    If implemented properly it won’t show any warnings.

    But please note that this code is for articles only. So if you test pages or e.g. your front page the structured data will not be provided.

    I wish you a nice weekend.

    Regards
    Michael

    Thread Starter babyalpha

    (@babyalpha)

    Ic! No wonder it still exists warning when I test the front page https://babyalpha.hk.

    Thanks so much and have a nice weekend!

    Alpha

    mikpj

    (@mikpj)

    This worked great for me thanks.
    https://www.myglutenfreestory.com

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘warnings in Google rich snippet tool’ is closed to new replies.