Remove date ONLY in pages (5 posts)

  1. yauhui
    Posted 7 years ago #

    I wish to remove the date that appears beside the title ONLY in pages.

    I already have this settled for the posts, with the Date Exclusion SEO plugin that only hides the date in single post pages.

    Now, I would like to achieve this same effect in the pages (e.g. About) while still having the date show on the main page.

    Is this by any chance possible?

  2. figaro
    Posted 7 years ago #

    You will need to edit your page.php file in the theme and remove the date/time. It could be called in different ways, but look for something like this:

    <?php the_time(get_option('date_format').', '.get_option('time_format')) ?>

    or maybe something like this:

    <?php the_time('F jS, Y') ?>

    and either delete it or comment it out.

  3. yauhui
    Posted 7 years ago #

    I don't have a page.php in my theme.

    There's only header.php, index.php, sidebar.php, comments.php, footer.php and style.css.

    I'm using the Treba theme btw.

  4. karenkelley9
    Posted 7 years ago #

    Does this work for version 1.6? I've tried changing archive.php and single.php and it does not seem to be removing the date on the posts.

  5. r3bb
    Posted 6 years ago #

    Thanks figaro, your solution worked for me. Your post showed up in Google search results.

Topic Closed

This topic has been closed to new replies.

About this Topic