How To Remove Tags and Author From Posts WordPress in Twenty Sixteen Theme

5/5 - (1 vote)

Updated on January 11, 2021

If you want to remove Tags, Author and Date from your post in WordPress twenty sixteen theme. Sometimes is very annoying to display the author, date and tags under the post. Most of the users want this thing to display on top of the post. So if you want to remove the Tags, author and date from your post which show on left side of your post. Here we will tell you how to remove these things with easy steps.

Note : Before Editing source code copy your code for backup.

Steps to Remove Tags and Author From Posts WordPress in Twenty Sixteen Theme

Step – 1 – First you need to login in your WordPress admin account.

wordpresslogin
Step – 2

Then click on Appearance > Editor > On Right Side Click on template-tags.php

Step – 3

Click on Template-tags.php then new window appears with source code now you have to remove the below code which I have added below :

Click on appearance

Remove below added code from Template-tags.php in Twenty Sixteen WordPress theme, Keep in mind that these steps only work in tewnty sixteen WordPress theme.

NOTE:

Before removing these code please copy your full code of your template-tags.php in any Editors like Notepad or Sublime.

if ( ‘post’ === get_post_type() ) {
$author_avatar_size = apply_filters( ‘twentysixteen_author_avatar_size’, 49 );
printf( ‘<span class=”byline”><span class=”author vcard”>%1$s<span class=”screen-reader-text”>%2$s </span> <a class=”url fn n” href=”%3$s”>%4$s</a></span></span>’,
get_avatar( get_the_author_meta( ‘user_email’ ), $author_avatar_size ),
_x( ‘Author’, ‘Used before post author name.’, ‘twentysixteen’ ),
esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
get_the_author()
);
}
if ( in_array( get_post_type(), array( ‘post’, ‘attachment’ ) ) ) {
twentysixteen_entry_date();
}

$format = get_post_format();
if ( current_theme_supports( ‘post-formats’, $format ) ) {
printf( ‘<span class=”entry-format”>%1$s<a href=”%2$s”>%3$s</a></span>’,
sprintf( ‘<span class=”screen-reader-text”>%s </span>’, _x( ‘Format’, ‘Used before post format.’, ‘twentysixteen’ ) ),
esc_url( get_post_format_link( $format ) ),
get_post_format_string( $format )
);
}

Just check the above code and remove the source code from template-tags.php file. If you face any problem just comment below. We will surely help you to solve this problem.

If above solution will not work then here I’ll adding an alternate method to remove Author and tags form WordPress theme Twenty Sixteen.
Add below code in your CSS customizer or in the custom CSS page. For best practice you can Inspect your page and check which class is added against author and tags then you can also modify below code according to your WordPress theme.


.author {display:none;}
.posted-on {display:none;}
.comments {display:none;}

OR
.post_info.infoPost {
display: none;
}
OR
.postmetadata {display:none;}

4 thoughts on “How To Remove Tags and Author From Posts WordPress in Twenty Sixteen Theme”

  1. Thanks for this detailed information. The video was excellent and bright for every newbie to learn because as I’m a newbie, I understand it very much. I will try out from my end and share my experience too in this article.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top