Site logo

Archived topic

Google is not indexing the last updated date.

4 replies · Started by David on April 22, 2018

Viewing posts 1–5 of 5

Hello
Google is showing the published date & not indexing the last updated date. I changed heading to test it. Yes. Heading changed within 1 day & meta description also changed, but not last updated date.
My CSS file is here

.posted-on .updated {
    display: inline-block;
}
.posted-on .published {
    display: none;
}

.posted-on .updated:before {
    content: "Last updated: ";
}
.post-navigation {
    display: none;
}

Can you help me how to get index the last updated date?
Thank you.

I added the following code to my child theme function.php

function wpb_last_updated_date( $content ) {
$u_time = get_the_time('U'); 
$u_modified_time = get_the_modified_time('U'); 
if ($u_modified_time >= $u_time + 86400) { 
$updated_date = get_the_modified_time('F jS, Y');
$updated_time = get_the_modified_time('h:i a'); 
$custom_content .= '<p class="last-updated">Last updated on '. $updated_date . ' at '. $updated_time .'</p>';  
} 
 
    $custom_content .= $content;
    return $custom_content;
}
add_filter( 'the_content', 'wpb_last_updated_date' );

But not worked.
Then I installed "Post updated date" plugin. But not worked.

I just relaxed after reading the reply.
but How many days we need to wait for the 2.1 version?
Thank you.

We're hoping to get it released tomorrow. However, you can install it right now by following the instructions on the page I linked to :)

This archived topic is closed to new replies.