WordPress.org

Ready to get started?Download WordPress

Forums

How do I remove dates from certain posts? (3 posts)

  1. JamesDowen
    Member
    Posted 3 years ago #

    My new WordPress website has a number of posts now but there are certain posts I want the post date to be removed from. My site has things like news, reviews and biographies but I want dates to be removed from biographies as these are always been edited and I don't want them to look 'out of date'. Is there a way of removing the post date from certain posts or categories? Maybe a plugin or by editing some code?

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    you could wrap the date output code into a conditional statement using in_category('biographies') or so, assuming that the category is specific to these posts;

    example:

    <?php if( !is_category('biographies') ) /*the existing date output code, for instance:*/ the_date(); ?>

    use the existing code as a starting point.

  3. JamesDowen
    Member
    Posted 3 years ago #

    I'm no good with PHP could you explain this to me in easy steps please.

Topic Closed

This topic has been closed to new replies.

About this Topic