How to remove the default post date (unix timestamp -January 1,1970) in wordpress

Discussion in 'PHP' started by sam_pras, Jun 13, 2013.

  1. #1
    Hi, how to remove the default post date in wordpress. I want to completely remove it, it should be empty. Forgive me if i asked any coding newbie question.
     
    sam_pras, Jun 13, 2013 IP
  2. sorindsd

    sorindsd Well-Known Member

    Messages:
    201
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    118
    #2
    Just search for the_time function and remove it. Usually it's <?php the_time('F j, Y'); ?>
     
    sorindsd, Jun 13, 2013 IP
  3. sam_pras

    sam_pras Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    Hi, but will removing this affect the dates of other posts? And where is this piece of code located?
     
    sam_pras, Jun 13, 2013 IP
  4. sorindsd

    sorindsd Well-Known Member

    Messages:
    201
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    118
    #4
    If you want to remove the date only for 1 post you should something like this <?php if(!is_page(replace_with_post_id)){the_time('F j, Y')}; ?>
    This is located on home.php ot page.php or index.php depending on the wp theme that you are using.
     
    sorindsd, Jun 14, 2013 IP
  5. Marcel Preda

    Marcel Preda Member

    Messages:
    21
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    43
    #5
    Hi Sam,
    I guess that an elagant solution will be to install a wordpress plugin named "WP Date Remover" (just google for it).
    It seems to do exactly what you want (never try it personally).

    BR,
    Marcel
     
    Marcel Preda, Jun 18, 2013 IP