Title: Remove Dates from Archived Posts
Last modified: August 19, 2016

---

# Remove Dates from Archived Posts

 *  Resolved [JG99](https://wordpress.org/support/users/jg99/)
 * (@jg99)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/)
 * Hello, I want to remove the dates from archived posts. Here is the archive.php
   file:
 * <h2 class=”pagetitle”><?php printf(__(‘Archive for the ‘%1$s’ Category’), single_cat_title(”,
   false)); ?></h2>
    <?php endif; ?>
 *  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    <h2 class=”
   pagetitle”><?php printf(__(‘Archive for %1$s’), get_the_time(__(‘F jS, Y’)));?
   ></h2>
 *  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    <h2 class
   =”pagetitle”><?php printf(__(‘Archive for %1$s’), get_the_time(__(‘F, Y’))); ?
   ></h2>
 *  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    <h2 class
   =”pagetitle”><?php printf(__(‘Archive for %1$s’), get_the_time(‘Y’)); ?></h2>
 * Do I remove code starting from [get_the_time] until the final [)]?
 * Thank you for your help.

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437649)
 * That probably isn’t the right code you want to change if you are wishing to no
   longer display the date with each post.
 * Look for something like ‘the_date’ or ‘the_time’.
 *  Thread Starter [JG99](https://wordpress.org/support/users/jg99/)
 * (@jg99)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437821)
 * MichaelH, is the key in the [Hack. Set $post so that the_date() works.] section?
 * I have been able already to turn off the date on current posts, I am concerned
   now with the archives.
 * Thanks for your help, sorry to post so much code. How can I post code in a neater
   fashion?
    ——————————————————–
 * <?php get_header(); ?>
 *  <div id=”content” class=”narrowcolumn”>
 *  <?php if (have_posts()) : ?>
 *  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    <?
   php /* If this is a category archive */ if (is_category()) { ?>
 *  <?php if (function_exists(‘lang_picker_respect_more’)) : ?>
    <h2 class=”pagetitle”
   ><?php printf(__(‘Archive for the ‘%1$s’ Category’), lang_picker_respect_more(
   single_cat_title(”,false))); ?></h2> <?php else : ?> <h2 class=”pagetitle”><?
   php printf(__(‘Archive for the ‘%1$s’ Category’), single_cat_title(”,false));?
   ></h2> <?php endif; ?>
 *  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    <h2 class=”
   pagetitle”><?php printf(__(‘Archive for %1$s’), get_the_time(__(‘F jS, Y’)));?
   ></h2>
 *  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    <h2 class
   =”pagetitle”><?php printf(__(‘Archive for %1$s’), get_the_time(__(‘F, Y’))); ?
   ></h2>
 *  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    <h2 class
   =”pagetitle”><?php printf(__(‘Archive for %1$s’), get_the_time(‘Y’)); ?></h2>
 *  <?php /* If this is a search */ } elseif (is_search()) { ?>
    <h2 class=”pagetitle”
   ><?php _e(‘Search Results’); ?></h2>
 *  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    <h2 class
   =”pagetitle”><?php _e(‘Author Archive’); ?></h2>
 *  <?php /* If this is a paged archive */ } elseif (isset($_GET[‘paged’]) && !empty(
   $_GET[‘paged’])) { ?>
    <h2 class=”pagetitle”><?php _e(‘Blog Archives’); ?></h2
   >
 *  <?php } ?>
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437856)
 * Please provide a URL to show the problem and give an example of what you want
   removed.
 *  Thread Starter [JG99](https://wordpress.org/support/users/jg99/)
 * (@jg99)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437858)
 * [http://themes.jillij.com/category/themes/](http://themes.jillij.com/category/themes/)
 * Michael, you can see where it says “Jillij version 14” and then below that it
   says “Sunday, July 6th, 2008”
 * I want to remove “Sunday, July 6th, 2008”
 * Thank you for helping me.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437862)
 * Please paste all the code in that template into a pastebin such as [wordpress.pastebin.com](http://wordpress.pastebin.com),
   and report the link back here.
 *  Thread Starter [JG99](https://wordpress.org/support/users/jg99/)
 * (@jg99)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437864)
 * Are you saying I should paste the code for the entire theme? Or just for archive.
   php?
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437865)
 * Yes, just the archive.php if that is the template that is displaying the view
   you want to change. See [Template Hierarchy](http://codex.wordpress.org/Template_Hierarchy)
   to confirm.
 *  Thread Starter [JG99](https://wordpress.org/support/users/jg99/)
 * (@jg99)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437866)
 * OK, here it is:
 * [http://wordpress.pastebin.com/Nhtmj56f](http://wordpress.pastebin.com/Nhtmj56f)
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437869)
 * Delete this:
 *     ```
       <small><?php the_time(__('l, F jS, Y')) ?></small>
       ```
   
 *  Thread Starter [JG99](https://wordpress.org/support/users/jg99/)
 * (@jg99)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437870)
 * Michael, it works! Thank you.
 * Can I ask one more question?
 * You will notice that this theme has a drop-down menu. I would like the menu to
   be at the top of the photo, rather than at the bottom. Can you help me change
   that?
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437871)
 * Better to start a new topic with that question.
 *  Thread Starter [JG99](https://wordpress.org/support/users/jg99/)
 * (@jg99)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437872)
 * Here’s the header file link:
 * [http://wordpress.pastebin.com/NsiUqWg8](http://wordpress.pastebin.com/NsiUqWg8)
 * And here’s the stylesheet file link:
 * [http://wordpress.pastebin.com/azh6nEap](http://wordpress.pastebin.com/azh6nEap)
 *  Thread Starter [JG99](https://wordpress.org/support/users/jg99/)
 * (@jg99)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437873)
 * OK, will do.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Remove Dates from Archived Posts’ is closed to new replies.

## Tags

 * [archived posts](https://wordpress.org/support/topic-tag/archived-posts/)
 * [remove dates](https://wordpress.org/support/topic-tag/remove-dates/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 2 participants
 * Last reply from: [JG99](https://wordpress.org/support/users/jg99/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/remove-dates-from-archived-posts/#post-1437873)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
