Mobile app version of vmapp.org
Login or Join
Vandalay111

: Why does Google not recognize hentry updated? I have the following code for my date in my blogpost: <time class="date updated" datetime="2015-10-06"> <a href="http://www.foo.de/2015/10/06/">6.

@Vandalay111

Posted in: #Dates #GoogleRichSnippetsTool #Html5 #Microformats

I have the following code for my date in my blogpost:

<time class="date updated" datetime="2015-10-06">
<a href="http://www.foo.de/2015/10/06/">6. Oktober 2015</a>
</time>


But the Google Structured Data Testing Tool does not recognize the datetime. What am I doing wrong?

Here is the PHP version:

<time class="date updated" datetime="<?php the_time('Y-m-d'); ?>">
<a href="<?php echo get_day_link( get_the_time('Y'),
get_the_time('m'), get_the_time('d')); ?>">
<?php echo get_the_date() ?>
</a>
</time>


Here comes more:
This is the part in single.php where the Date and other metadata gets loaded.

<header class="topinfo animated" data-anim="fadeInDown">
<h1 title="<?php the_title() ?>" class="entry-title"><?php the_title() ?></h1>
<?php get_template_part('part', 'textinfo') ?>
</header>


This is the file where the date and the metadata come from

<?php if( ( !is_page() and $iw_opt['single-date'] ) or ( is_page() and $iw_opt['page-date'] ) ) : ?>
<li>
<time class="date updated" datetime="<?php the_time('Y-m-d'); ?>">
<a href="<?php echo get_day_link( get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?>">
<?php echo get_the_date() ?>
</a>
</time>
</li>
<?php endif; ?>

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme