最近的帖子更改标题日期

时间:2012-12-20 11:39:23

标签: wordpress date posts

我正在尝试更改日期,当您点击日历并发布帖子时。

目前标题为Y,m,d(2012年12月20日)我想将其更改为l,F j,Y至(2012年12月20日,星期四)。

我操纵哪个PHP Wordpress文件进行此更改?

干杯

约翰

1 个答案:

答案 0 :(得分:0)

请做一件事只需用functions.php中的函数替换函数twentyeleven_posted_on() 希望它能为您提供所需的日期格式。

function twentyeleven_posted_on() {
    printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ),
        esc_url( get_permalink() ),
        esc_attr( get_the_time() ),
        esc_attr( get_the_date( 'l, F j, Y' ) ),
        esc_html( get_the_date() ),
        esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
        esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
        get_the_author()
    );
}
相关问题