Remove – Modify the Utility Text in TwentyTwelve Theme

email me

Have you ever noticed the Created Date and Categories just below your post? Well, let’s say you didn’t want to show ‘Categories’ anymore. How would you remove it?

To modify what is known as utility text, open the functions.php file, and change the utility code section to your liking.

Before


	// 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' );
	}

 

After


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