the right way to remove post dates and author –

If you’re trying to remove the post dates and author in WordPress Twenty Fifteen theme, you could just add the following code to the style.css file of your child theme:

.entry-footer {
display:none !important;

An awful lot of WordPress forums show an excessive use of this CSS trick. It works perfectly, except for one detail: the date and author are only hidden (i.e. not displayed in the browser), but they are still present in the page source code!

Check it by yourself: first change the CSS code and refresh your page. Then hit Ctrl + U to display the source, and search ( Ctrl + F ) for “entry-footer”. Your post date and and author are still there. Google and other bots and crawlers see it, and some people argue that dating posts may be bad for SEO (in some cases).

Definitely remove post date and author from the source code

If you want a fast and easy solution, here it is. Just add following lines to the functions.php file of your child theme, inside the and ?> tags:

/* Remove everything from post footer (aka entry footer) */
function twentyfifteen_entry_meta() {

This will safely remove all content from the so called entry footerbut won’t remove the entry footer itself. You can still use the CSS trick up there to hide the footer space itself. Check out how it looks like on my new website about ethical banking: I used both the php and the CSS code.

Twenty Fifteen - Remove post date and authorNote that this code will only work so easily because the twentyfifteen_entry_meta() function is “pluggable” and can be overridden in the child’s functions.php file. If you want to customize the entry footer to add categories, tags, “add a comment” or social links, check out the following excellent post describing the twentyfifteen_entry_meta() function, which controls the post footer:
Custom meta in Twenty Fifteen

Finally, here is another really useful article about overriding theme functions, which may also be helpful to remove the meta info (post author, date, categories, etc.) of other themes, and much more:
The Right Way to Override Theme Functions

More useful articles on WordPress and WordPress Multisite

Check out the following posts on setting up a WordPress site network and backing up Multisite WP setups:
Cheat-sheet: Creating a new WordPress site (within a site network)
A comparison of free multisite-compatible WP Backup plugins


#remove #post #dates #author

Leave a Comment

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