Skip to content

Instantly share code, notes, and snippets.

@solepixel
Last active December 19, 2015 00:49
Show Gist options
  • Save solepixel/5871243 to your computer and use it in GitHub Desktop.
Save solepixel/5871243 to your computer and use it in GitHub Desktop.
Stacked Date
$prefix = hybrid_get_prefix();
add_filter( "{$prefix}_byline", 'wwon_byline');
function wwon_byline($byline){
if(!is_single()){
$byline = '<div class="post-date">
<span class="post-date-month">'.get_the_date('M').'</span>
<span class="post-date-day">'.get_the_date('d').'</span>
</div>
[entry-edit-link before="<div class=\'edit-link\'>" after="</div>"]';
} else {
$byline = '<div class="byline">' . __( get_the_date('n/j/Y').' by [entry-author] [entry-edit-link before=" | "]', 'wwon' ) . '</div>';
}
return $byline;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment