Yet another WP query...

3 replies
  • WEB DESIGN
  • |
Can anyone tell me how to delete the date from posts please.

Thanks:confused:
#query
  • Profile picture of the author pjCheviot
    Banned
    Hi Karen

    Depending on the theme and which parts of the blog you want to remove the date shown from, there are a few template files you may need to modify -- index.php, archive.php, and single.php - maybe more.

    Look for and delete the following bit of code in the areas that you don't want to show, and you should be good to go:-

    Code:
    < ?php the_time('F j, Y'); ? >
    or
    Code:
    <?php the_time(); ?>
    or
    Code:
    <?php the_date(); ?>
    or similar

    Remember to have a backup of the files you are going to edit - so that if it doesn't look right or you take out too much (or too little) you can revert back to the original.

    Remember that by doing this - if you change your theme it will almost certainly revert back to showing all dates.

    There may also be a plugin (haven't looked) to avoid all the coding?

    All the best.
    {{ DiscussionBoard.errors[1652663].message }}
  • Profile picture of the author sizzler_chetan
    Hey if you want to remove the date stamp from your post pages, then you will just need to search for the code <?php the_date(); ?> in single.php in the theme files. And then remove that code and save the code page.

    Anyways, pjCheviot explained it better for codes which can help you remove the time too, along with the date.
    Signature

    ~Chetan
    A very late entrant to Warrior Forums.. been on every other webmaster forum since years!
    SEO Hyd SEO Services!

    {{ DiscussionBoard.errors[1652694].message }}
  • Profile picture of the author Karen Connell
    Thank you both for your help.

    I didn't realise that there was more than one place to remove the code from - duh!

    Karen
    Signature

    Never Mistake Activity for Accomplishment

    {{ DiscussionBoard.errors[1655212].message }}

Trending Topics