Forcing dates into the future (1 post)

  1. gavengi
    Posted 3 years ago #

    Hello! I am currently working on a child theme of twentyeleven for a website that will be set in a fictional year 2034. Since setting a post's date to the future only schedules it for publishing, I decided simply to edit the code to add twenty-two years. The post time seems to be controlled by the function twentyeleven_posted_on(), but when I delved into this function, I discovered I'm not familiar with the format.

    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" pubdate>%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( 'c' ) ),
    		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() ) ),

    I've read a few posts about editing this function, but mostly only discussing how to have times displayed, as in "... at XX:XX." Could someone direct me to where I might add 22 to the year?

    Thanks much!

Topic Closed

This topic has been closed to new replies.

About this Topic