For my wordpress website I am trying to remove the Google timestamp that is currently in my SERP (search page result description.)
To do this I must use javascript to get the time and report it back.
You may want to refer to this link: http://www.andrewkeir.com/remove-wordpress-post-datestamp-timestamp-google-serps/
function twentyten_posted_on() {
printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
'meta-prep meta-prep-author',
sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
),
In the above code get_the_time() and get_the_date() are the parts are want to replace with the following javascript:
<script language="javascript" type="text/javascript">document.write("<?php the_time('F jS, Y') ?>");</script>
Whats the PHP code to do this! I have tried a million things which all result in error's so I think I may be overlooking something.