Support » Fixing WordPress » Date stamp on Posts

  • Does anyone know how to turn off or disable the Date stamp for Posts? I see where you can edit it but I don’t want the date to show up on my Posts.

Viewing 15 replies - 1 through 15 (of 18 total)
  • It all depends on what theme you’re using. However, what you’ll probably want to search for in your theme files would be the_date().

    If you’re using TwentyTen as your theme, you should create a child theme before making any modifications. Otherwise, your changes will be overwritten when you upgrade WordPress.

    Thanks for the reply. Actually I’m not using the default theme or any free or purchased theme. We created our own.
    Would “the_date” still be there regardless of anything?
    I looked in the Admin and on the server itself in WP-content/themes/the theme we are using (custom). No such file.

    if you made that theme, you should know what you put into it (?)

    the_date() or the_time() are wordpress functions that you can add to/or remove from your templates, inside the loop.

    possibly you need to look into index.php, single.php, page.php, archive.php …

    The date is only showing on Posts not Pages. Does that make any difference?

    the only differencs is that you don’t need to search page.php

    i don’t see the difficulty in searching a few theme files, particular as you have designed the theme and should be familiar with all aspects of the full code (?)

    Well actually I didn’t create the custom theme. My designer did and he’s not available for a few days and my client asked about how to remove the date from those Posts. I’m just trying to figure out where it is so I can comment or remove that snippet of code.

    So you are saying its not going to be in page.php but it could be in the other php files you mentioned?

    index.php, single.php, archive.php

    if the date shows on the posts on the front page, the code is likely to be found in index.php (or loop.php in some themes, which might point to functions.php); if the date shows in a single post, then in single.php; if the date shows in a date or category archive, it could be in archive.php or catgegory.php and so on:

    there is (hopefully) a limited amount of theme files; and hopefully not all programmed too complicated (although this depends on the way your designer is thinking, and on the theme he/she based your custom theme on)

    Here’s a post where it shows up
    it says Wednesday, May 25th, 2011

    I found this in archive.php

    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

    but its commented out.

    How can the_date be working if
    $posts is not set to the_date()
    cause it says this

    Does your theme have a loop.php file (or possibly multiple loop-XXX.php files)? If so, that’s where you’d probably want to look.

    the post you linked to is in a category archive;
    look into category.php (or archive.php if category.php does not ecist) and look for:

    <div class="post">
    				<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    				<small><?php the_time(' .. '); ?></small>
    				<div class="entry">

    (or very similar)

    this line <small><?php the_time(' .. '); ?></small> (again, could be similar, could be the_date(' ... '), and the stuff in the brackets could be different) should be the one to remove.

    (be aware that changes made to archive.php there will effect posts in other archives as well)

    nope, no loop type files.

    I did find this in another php file but I guess its not it since it doesn’t say “the_date”

    <?php comment_date(‘F jS, Y’) ?>


    no category.php file at all.
    We do have archive.php though.

    I do see the snippet of code you mention but no “the_date” just _time

    Dates for whatever reason are not showing up on Pages, just Posts so that’s fine.

    So, as alchymyth suggested, try removing the_time() and the HTML code that surrounds it, and see if that does it (make sure you back up the theme file just in case something breaks when you remove that code).

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Date stamp on Posts’ is closed to new replies.