• How can I remove the date & timestamp from a Page only (not from Post pages) ?? I want to create some pages like “about us” or an “Email form” and I don’t want a date there… I have WP 1.5

Viewing 10 replies - 1 through 10 (of 10 total)
  • You would delete the tags from the Page template.

    Duplicate the contents of the index.php for your theme in a file called page.php, and remove the date/time tags from The Loop in that template.

    Thread Starter jonny

    (@jonny)

    Oriecat & Kafkaesqui, thanks for your answer.

    Kafkaesqui, I’m still confused, then how WP will know the difference between a Post page and a Static Page ??? I noticed that a Post page is something like this:

    https://myblog.com/?p=5’

    and the Static page is:

    https://myblog.com/?page_id=2’

    Maybe it is a way to call the page.php for the Static page??? And where is it??

    I think it just happens automatically. If you have a page.php, it will use it for any pages.. If not, then it uses the other one.

    “I think it just happens automatically.”

    Oui oui. Sometimes WordPress is dang smart about these things. Now if it’d only remember to make that wakeup call…

    Thread Starter jonny

    (@jonny)

    Well… I have to say this…. I had my doubts about this… but it works!!! I don’t know why. Just create a copy of my index.php, rename it page.php, and remove the ‘<?php the_time(“l j F Y @ g:i a”) ?>’ and your post page have a date and your static pages have no date.

    Thanks guys !!

    Maybe would be good to know how it happens ??

    Just trust in the magic. ??

    oriecat already provided an excellent two-sentence explain:

    “If you have a page.php, it (i.e. WordPress) will use it for any pages.. If not, then it uses the other one (i.e. index.php).”

    That pretty much describes the behind the scenes functionality.

    If you really want gory details, read this and look at the end of wp-blog-header.php.

    Thread Starter jonny

    (@jonny)

    Ryan… there’s the magic !! That’s exactly where all comes from. Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Remove datestamp in a Page’ is closed to new replies.