Remove Date Below Post in Twenty Twelve Theme

This is the method on how to remove date from the post if you are using Twenty Twelve Theme in your wordpress blog. The example date under the post is

This entry was posted in Uncategorized on January 7, 2013.

To remove it, in wordpress admin area, select “Appearance” and “Editor”. Select “Theme Functions (functions.php)” file and search for the code as below,

	// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
	if ( $tag_list ) {
		$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
	} elseif ( $categories_list ) {
		$utility_text = __( 'This entry was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
	} else {
		$utility_text = __( 'This entry was posted on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
	}

What you need to change to to remove “on %3$s” in 3 locations in each line start with “$utility_text”. Done 🙂



2 comments… add one
  • Hello,

    Thank you for this post!

    I’d like to replace the whole bit, say “This entry was posted in Uncategorized on January 29, 2013.” with something of my own. Is it the case of replacing each bit in the utility line:

    This entry was posted in %1$s and tagged %2$s on %3$s
    This entry was posted in %1$s on %3$s
    This entry was posted on %3$s

    with my own text?

    I appreciate your help!

    Reply
    • Hello,

      Yes, you can replace it with your own text by changing those lines. %1$s, %2$s & %3$s are variables that you can use.

      Reply

Leave a Comment