How To Get Rid Of The Time And Date On Wordpress.

13 replies
Found this and thought it might be useful. I have one or two people ask me about it in the past.
Personally I would rather leave the date on my posts, but I can see the other side of the argument.

How to remove dates in a word press blog
To remove the the date from your posts, you have to remove a single line of codes in 2 places in your blog theme. You don't need to be an expert to do this. Here is how to do it:
1- On your dashboard, go to Appearance- editor, and click on your Main Index Template (index.php). Find and delete this line of code
<?php the_time('F jS, Y') ?>
and hit update file.
2- On your dashboard, go to Appearance- editor, and click on your Single post page (Singles.php). Find and delete this line of code
<?php the_time('F jS, Y') ?> and hit update file.
That's it! Your posts will no longer have time and date displayed. You've just learned how to remove dates in a WordPress blog.

Hope this is of use.
#date #rid #time #wordpress
  • Profile picture of the author Sheryl Polomka
    Thanks Andy, does this work if you want to get rid of 'edit' or 'category' or the other bits and pieces that show up?
    Signature
    {{ DiscussionBoard.errors[2710044].message }}
    • Profile picture of the author Istvan Horvath
      Originally Posted by Sheryl Polomka View Post

      Thanks Andy, does this work if you want to get rid of 'edit' or 'category' or the other bits and pieces that show up?
      The "edit" button is seen only by the logged-in admin...

      And yes, you can add/remove any template tag in any template file of a theme.

      Warning! Using the online template file editor in wp-admin > Appearance > Editor can have catastrophic effects!!!
      1. There is no UNDO button.
      2. You have to make the files world writable (chmod 666) to make it work =
      3. which means you blog is wide open and inviting all the hackers to kill you blog

      Do yourself a favour and edit the files on your own computer...
      Signature

      {{ DiscussionBoard.errors[2710445].message }}
  • {{ DiscussionBoard.errors[2710245].message }}
    • Profile picture of the author fazlerocks
      Originally Posted by Carl-Reed View Post

      Here's a plugin that does it for you mate

      Date Exclusion WordPress Plugin
      Hey Thanks for that!! Well, I just wonder why should one take risks with the codes manipulations when there is plugin available for the same task!
      {{ DiscussionBoard.errors[2719598].message }}
      • Profile picture of the author Istvan Horvath
        Originally Posted by fazlerocks View Post

        Hey Thanks for that!! Well, I just wonder why should one take risks with the codes manipulations when there is plugin available for the same task!
        Actually, the right question is: why would anybody bloat their WP install with resource-hog plugins when it can be done with a simple delete operation in the template file?

        And talking about "risk": unless you are a coder you never know what kind of risk a plugin will introduce into your blog...
        Signature

        {{ DiscussionBoard.errors[2720190].message }}
        • Profile picture of the author Joe Mobley
          Here's how I remove "Recent Comments" from the sidebar.

          I comment out the code. By adding opening and closing comment code, in effect, that portion of code is turned into a "comment" and not processed.

          I also comment out the "Categories" and "Archives" in the same sidebar.php file.

          I prefer the commenting out in case I want to un-comment it at some point.

          Here's a pic of what I mean.

          Comment out _Recent Comments_

          Hope this helps.

          Joe
          Signature

          .

          Follow Me on Twitter: @daVinciJoe
          {{ DiscussionBoard.errors[2721195].message }}
        • Profile picture of the author CyberSEO
          Originally Posted by Istvan Horvath View Post

          And talking about "risk": unless you are a coder you never know what kind of risk a plugin will introduce into your blog...
          The same applies to the themes you are using. Do you know that even the most of premium themes have serious vulnerabilities in their code and outdated libraries like timthumb etc? If you are not a coder, you are always taking a very serious risk using WP.
          Signature
          CyberSEO Pro - the ultimate all-in-one autoblogging WordPress plugin, powered by OpenAI GPT-4, Anthropic Claude, Google Gemini Pro, Midjourney, DALL-E 3 and Stable Diffusion XL
          {{ DiscussionBoard.errors[7223350].message }}
          • Profile picture of the author TheArticlePros
            [DELETED]
            {{ DiscussionBoard.errors[7223382].message }}
            • Profile picture of the author CyberSEO
              Originally Posted by JaRyCu View Post

              You do know you're posting in a thread that's 2 years old, right?
              No, I didn't see the date of the first post. How come this thread was in the recent "Main Internet Marketing Discussion Forum"? Is that a bug or what?
              Signature
              CyberSEO Pro - the ultimate all-in-one autoblogging WordPress plugin, powered by OpenAI GPT-4, Anthropic Claude, Google Gemini Pro, Midjourney, DALL-E 3 and Stable Diffusion XL
              {{ DiscussionBoard.errors[7223398].message }}
  • Profile picture of the author andybeveridge
    Sheryl, I am afraid I do not know the answer to that question. I found that bit of info out and thought I would share it.

    Carl, that looks like that might make life easier.
    Signature

    Become a Digi Warrior and join us in the successful Dig Warrior IM Academy
    Join us at www.digiwarrior.com

    {{ DiscussionBoard.errors[2710396].message }}
  • Profile picture of the author King Shiloh
    Banned
    Originally Posted by andybeveridge View Post

    Found this and thought it might be useful. I have one or two people ask me about it in the past.
    Personally I would rather leave the date on my posts, but I can see the other side of the argument.

    How to remove dates in a word press blog
    To remove the the date from your posts, you have to remove a single line of codes in 2 places in your blog theme. You don't need to be an expert to do this. Here is how to do it:
    1- On your dashboard, go to Appearance- editor, and click on your Main Index Template (index.php). Find and delete this line of code
    <?php the_time('F jS, Y') ?>
    and hit update file.
    2- On your dashboard, go to Appearance- editor, and click on your Single post page (Singles.php). Find and delete this line of code
    <?php the_time('F jS, Y') ?> and hit update file.
    That's it! Your posts will no longer have time and date displayed. You've just learned how to remove dates in a WordPress blog.

    Hope this is of use.

    I have searched for the above codes but I couldn't find any. Maybe they don't exist.

    Could anyone find them?
    {{ DiscussionBoard.errors[2719563].message }}
    • Profile picture of the author AFI
      Originally Posted by King Shiloh View Post

      I have searched for the above codes but I couldn't find any. Maybe they don't exist.

      Could anyone find them?
      By the way.....this won't work on all Word Press templates. Not all WP designers have named the files the same thing. So one page that can be named "singles.php" by one designer can be named "single-post.php" by another designer.

      You really kind of need to know what you're doing before you do this. If you aren't familiar with code, do not do this.
      Signature

      Learn about Internet Marketing from my dofollow comment blog.....Make Extra Money At Home...
      I WILL BUILD YOU YOUR OWN CUSTOM AMAZON REVIEW SITE - HUNDREDS SOLD!
      {{ DiscussionBoard.errors[2721374].message }}
      • Profile picture of the author Istvan Horvath
        Originally Posted by AFI View Post

        By the way.....this won't work on all Word Press templates. Not all WP designers have named the files the same thing. So one page that can be named "singles.php" by one designer can be named "single-post.php" by another designer.
        Hmmm... You must be using another WP than I do for over 6 years

        Since the introduction of the theme system (theme = a layout built of several template files) there are strict conventions - requirements, if you wish - what the template files should be named to work with WP.

        The examples you gave will not be recognized and used by WP unless they are called/included by name into another recognizable file.
        Signature

        {{ DiscussionBoard.errors[2722494].message }}
  • Profile picture of the author yukon
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[2721324].message }}
  • Profile picture of the author CyberSEO
    Originally Posted by andybeveridge View Post

    How To Get Rid Of The Time And Date On Wordpress.
    I'm sorry Sir to ask it, but, are you for real? Is the next "tutorial" will be on how to get rid of the post author(s) or links in the theme footer?
    Signature
    CyberSEO Pro - the ultimate all-in-one autoblogging WordPress plugin, powered by OpenAI GPT-4, Anthropic Claude, Google Gemini Pro, Midjourney, DALL-E 3 and Stable Diffusion XL
    {{ DiscussionBoard.errors[7223294].message }}

Trending Topics