How to Remove Date & Author Info Site-Wide in WordPress (Universal Snippet)

(Works on Most Themes — No Plugin Required)

If you want a cleaner, more professional website, removing the post date, author name, and other metadata is one of the most common customizations. Whether you’re running a documentation site, a plugin store, or a business site that doesn’t rely on blog timestamps, you may not want WordPress showing:

  • November 18, 2025 by admin
  • Posted on…
  • Written by…
  • Published on…
  • Updated on…

In this guide, you’ll learn two different universal methods to hide these items across your entire site:

1️⃣ CSS (Works on most themes — quick + easy)
2️⃣ PHP Code Snippet (More complete + theme-agnostic)

Let’s get started.


METHOD 1 — Remove Dates & Author Info Using Custom CSS

(Fastest method. No child theme needed.)

Most themes add the date / author inside elements with names like:

  • .posted-on
  • .byline
  • .entry-meta
  • .meta
  • .posted-by

Using CSS, we can hide ALL of them at once, even if your theme uses multiple classes.


Step 1: Open the WordPress Customizer

  1. Go to Appearance → Customize
  2. Scroll down and click Additional CSS

This opens a text box where you can safely paste your CSS without modifying theme files.


Step 2: Paste This CSS Snippet

/* Hide dates, author names, and meta elements site-wide */
.entry-meta,
.entry-meta * ,
.posted-on,
.byline,
.author,
.post-date,
.updated,
.meta,
.meta * {
    display: none !important;
}

This hides:

  • Publication date
  • Updated date
  • Author name
  • “Posted on…”
  • “By admin”
  • Any similar meta info

Click Publish to save.


METHOD 2 — PHP Code Snippet (Theme-Independent)

(Use this if your theme still shows metadata or you want a stronger override.)

Add this to a custom functionality plugin or your child theme’s functions.php:

// Disable date and author output in most WordPress themes
add_filter( 'the_author', '__return_empty_string' );
add_filter( 'the_date', '__return_empty_string' );
add_filter( 'the_modified_date', '__return_empty_string' );
add_filter( 'get_the_date', '__return_empty_string' );
add_filter( 'get_the_modified_date', '__return_empty_string' );

add_filter( 'the_author_posts_link', function() {
    return '';
});

This prevents WordPress from outputting any author/date content at all.


Which Method Should You Use?

MethodBest ForNotes
CSS Only90% of themesEasiest, safe, visually hides metadata
PHP SnippetAdvanced themes, stubborn metadataFully disables metadata output

You can use both together for maximum reliability.


Final Result

After adding the code:

  • No dates will show on posts
  • No author names show
  • No “posted by admin”
  • No timestamps on archives, categories, or WooCommerce product pages
  • Cleaner, more professional layout across the entire site

Downloadable Snippet (Copy-Ready)

/* Universal WordPress: remove date/author meta */
.entry-meta,
.entry-meta * ,
.posted-on,
.byline,
.author,
.post-date,
.updated,
.meta,
.meta * {
    display: none !important;
}
// Disable date and author output in most WordPress themes
add_filter( 'the_author', '__return_empty_string' );
add_filter( 'the_date', '__return_empty_string' );
add_filter( 'the_modified_date', '__return_empty_string' );
add_filter( 'get_the_date', '__return_empty_string' );
add_filter( 'get_the_modified_date', '__return_empty_string' );

add_filter( 'the_author_posts_link', function() {
    return '';
});

Want More WordPress Code Snippets?

Browse the HTML / PHP Code section on DevHero Digital for more shortcuts, fixes, and WooCommerce customizations.