• Hi there. I was wondering if anybody could help me with this problem. I’m working on my website with the WordPress CMS. I’m trying to get rid of the dates that appear on my About, Media, Contact, and Links pages. I read somewhere about copying the index.php file, saving it as page.php, then delete the post tags for time, date, category, etc. Here’s the catch – what if the theme has a post.php file already? Here’s the url of my site in progress – http://shigajet.trap17.com.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You mean it has a page.php already? Not post.php. If it has a page.php already, you edit that file. Look for the_date() (or possibly the_time() and remove it (and other things you don’t want there).

    Thread Starter shigajet

    (@shigajet)

    I checked the files in my theme, and I’m pretty sure there was a post.php file already with information about time, category, date, etc. It might help to check the page source and suggest what needs editing.

    Thanks in advance!

    post.php is different from page.php. Post.php defines how the individual blog posts will look like, page.php defines the layout for pages (About, etc.). So in your case, you need to edit page.php or create it if it doesn’t exist.

    If you already have a Page Template (page.php), you can edit (or remove, most likely) the <div class="post-title"></div> where the info on category and date is.

    Thread Starter shigajet

    (@shigajet)

    Still doesn’t work. Perhaps if I show the code snippet from the page.php file I made, where would I need to edit in order to remove the date and time.

    <div id=”content”>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <div class=”post”>
    <?php require(‘post.php’); ?>

    <?php comments_template(); // Get wp-comments.php template ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e(‘Sorry, no posts matched your criteria.’); ?>
    <?php endif; ?>
    <p align=”center”><?php posts_nav_link() ?>
    </div>

    If you have it like that it won’t work because both the index.php and the page.php call for the post.php to be inserted. So deleting the date and time in the post.php would mean not having date on the posts either.
    What I’d do: delete the call for the post.php from the page.php file AND insert the content of the post.php (or the relevant parts) into that place. After that you edit out/delete the calls for time and date.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Removing the date and time in your Pages’ is closed to new replies.