Title: Delete Date from Pages
Last modified: August 19, 2016

---

# Delete Date from Pages

 *  Resolved [PaulaO](https://wordpress.org/support/users/holyroller/)
 * (@holyroller)
 * [17 years ago](https://wordpress.org/support/topic/delete-date-from-pages/)
 * I have a site that is more CMS than blog. Almost everything is in pages vs posts.
   The date isn’t important there and I can easily just remove that line which I
   will.
 * But for another site where posts and pages are fairly equal, how can I remove
   a date from just a specific page or all pages? For example, on the About or Contact
   page, a date is just weird and makes the site feel unattended.
 * Is there a plugin for this? My theme, one I did myself based on the WP Classic
   years ago, doesn’t have a page.php.

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

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [17 years ago](https://wordpress.org/support/topic/delete-date-from-pages/#post-1061393)
 * if you don’t want it displaying on any pages you can do this
 *     ```
       <?php if (!is_page()) { ?>
       ---- date displaying code ------
       <?php } ?>
       ```
   
 * If you don’t want it only on About or Contact
 *     ```
       <?php
         $display_dt = true;
       if (is_page('about') || is_page('contact')) {
         $display_dt = false;
       }?>
   
       <?php if ($display_dt == true) {   // conditionally display date ?>
       ---- date displaying code ------
       <?php } ?>
       ```
   
 *  Thread Starter [PaulaO](https://wordpress.org/support/users/holyroller/)
 * (@holyroller)
 * [17 years ago](https://wordpress.org/support/topic/delete-date-from-pages/#post-1061399)
 * Cool beans! Both worked.
 * Question:
 * Let’s say I want to block the date on a third page. The code for that line would
   look like this?
 *     ```
       if (is_page('about') || is_page('contact') || is_page('subscribe')) {
       ```
   
 * I basically need a space, followed by || then the is_page(‘*’) and I can just
   keep listing pages, right? Waste of time and energy to do it but I’m curious 
   about how it would be written out.
 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [17 years ago](https://wordpress.org/support/topic/delete-date-from-pages/#post-1061402)
 * yes, your suggested code is correct.
 * When you get up to 6 or 8 it makes sense to do it a different way, either use
   a custom template for those pages that doesn’t have the date code on it in the
   first place, and assign that page template to those pages.
 * Or, create a function outside of the template that lists the pages to exclude.
   Then the template just says something like
    <h3><?php if (display_dt) {>< date
   display code > <?php } ?></h3>
 *  Thread Starter [PaulaO](https://wordpress.org/support/users/holyroller/)
 * (@holyroller)
 * [17 years ago](https://wordpress.org/support/topic/delete-date-from-pages/#post-1061457)
 * Again, thanks!
 *  [aagraphics](https://wordpress.org/support/users/aagraphics/)
 * (@aagraphics)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/delete-date-from-pages/#post-1061636)
 * newiebee here, what page do you add the code to? Or do you create it’s own file?
 *  [celebritywax](https://wordpress.org/support/users/celebritywax/)
 * (@celebritywax)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/delete-date-from-pages/#post-1061668)
 * What page do you add the code too?
 *  [celebritywax](https://wordpress.org/support/users/celebritywax/)
 * (@celebritywax)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/delete-date-from-pages/#post-1061669)
 * i dont want the following on any pages i created
 * “Posted: June 11th, 2009 | Author: admin | Filed under: Uncategorized | Modify:
   Edit This | Comments Off”
 * how do i delete this
 *  [turkeyjerky214](https://wordpress.org/support/users/turkeyjerky214/)
 * (@turkeyjerky214)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/delete-date-from-pages/#post-1061671)
 * I’ve been trying to add this code to different pages, and I can’t seem to find
   which page or where to add it to get it to work.
 * holyroller or stvwif, could you let us know which page and where in that page
   to add the code?
 * Thanks!
 *  [TFrancis](https://wordpress.org/support/users/jvbroker/)
 * (@jvbroker)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/delete-date-from-pages/#post-1061674)
 * aagrpahics, turkeyjerky214…
 * I added the suggested code:
 * > `<?php if (!is_page()) { ?>
   >  —- date displaying code —— <?php } ?>`
 * to the index.php file.
 * To do this you will need an FTP client (like Filezilla) so that you can access
   the index.php file.
 * Once you get the FTP client, then I open in an HTML editor. I simply pasted the
   above code before the first `div id` and it seems to work.
 * Note: I’m pretty green myself, so it any other gurus come along and tell us otherwise,
   then I immediatley bow to their superior knowledge.
 * JVB

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

The topic ‘Delete Date from Pages’ is closed to new replies.

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)
 * [page](https://wordpress.org/support/topic-tag/page/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 6 participants
 * Last reply from: [TFrancis](https://wordpress.org/support/users/jvbroker/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/delete-date-from-pages/#post-1061674)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
