Genesis使用快捷码显示发布日期[post_date]
还可以过滤帖子信息。。
试试这个。。
add_shortcode(\'post_updated_date\', \'set_last_updated_date\');
function set_last_updated_date($atts) {
if (get_the_modified_time() != get_the_time()){
return \'Last Updated on \' . the_modified_date(\'M jS, Y\',\'\',\'\',false);
} else {
return \'Published on \' . get_the_time(\'M jS, Y\',false);
}
}
add_filter( \'genesis_post_info\', \'post_info_filter\' );
function post_info_filter($post_info) {
if (is_home()) {
$post_info = \'<span class="home-meta"><time itemprop="dateModified" class="datetime entry-time">[post_updated_date]</time> By<span class="author"> [post_author_posts_link]</span><span class="entry-meta-content hidden-phone"> [post_categories before=" In "]</span></span>\';
} else {
$post_info = \'<span class="entry-meta-content"> [post_author_posts_link]</span><span class="entry-meta-content"> [post_updated_date]</span><span class="entry-meta-content"> [post_categories before=""]</span><span class="entry-meta-content"> [post_comments before=""]</span>\';
}
return $post_info;
}