WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Disable date and comment function on sub pages (3 posts)

  1. JasperLensselink
    Member
    Posted 4 years ago #

    I'm wondering how to erase the date on my subpages, while leaving the date of post on the main page.

    Anybody out there who can give some advice?

    http://www.JasperLensselink.com so you can see what I mean...
    I want to erase the date on the 'Biography - Contact and Portfolio'page.
    Is it also possible to disable the comment function for these pages?

    Thanks in advance,

    Jasper Lensselink

  2. Len
    Member
    Posted 4 years ago #

    Hi JasperLensselink,

    Very basic theme you have there. It's uses index.php for nearly everything. (at least the version of it that I found online) An easy way to accomplish want you want is to create a new template file called page.php Make it an exact copy of index.php WordPress will now use that template file to display pages.

    Open page.php
    To stop the date from appearing delete this ...

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

    With respect to comments you can close comments for those pages in the Edit Page screen.

    If you want to go one further, open page.php and delete the call to the comments php file ...

    <?php comments_template(); ?>

    You can also delete the comment link ...

    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »', 'commentslink'); ?>

    If you're interested here is some reading on the WordPress Template Hierarchy. This link explains what template files WordPress uses in a given situation.

  3. JasperLensselink
    Member
    Posted 4 years ago #

    Thanks again sooo much!
    Its great that everybody is so willing to help!

    Thanks,

    Jasper

Topic Closed

This topic has been closed to new replies.

About this Topic