Skip to content

Instantly share code, notes, and snippets.

@TanvirAmi
Created September 30, 2016 17:20
Show Gist options
  • Save TanvirAmi/70df1a019a16b9ed9e6634e9c158c767 to your computer and use it in GitHub Desktop.
Save TanvirAmi/70df1a019a16b9ed9e6634e9c158c767 to your computer and use it in GitHub Desktop.
<?php
//add hatom data
function add_suf_hatom_data($content) {
$t = get_the_modified_time('F jS, Y');
$author = get_the_author();
$title = get_the_title();
if (is_home() || is_singular() || is_archive() ) {
$content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
}
return $content;
}
add_filter('the_content', 'add_suf_hatom_data');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment