Support » Plugins » How to add a “new” button to most rcent posts?

  • I just switched to a magazine style them that lets me put the post important post of the day at the top, with other posts in chronological order below.

    I’d like a say to tip off readers which of the posts that follow are “new” perhaps with a tiny button saying “NEW!” or something similar.

    Are there are plugins that can do this, or snippits of code that can do this?

    Thanks for any advice

Viewing 2 replies - 1 through 2 (of 2 total)
  • By “new,” do you mean new today, or new since the reader’s last visit?

    If the former, it’s easy. If the latter, you’ll need to write yourself a little plugin (or edit your theme’s functions.php) to send a cookie to the visitor’s browser recording the time of their last visit.

    Whichever method you use, you would then edit your theme’s loop to check whether the post is newer than the comparison point. If so, add an additional CSS class to the post (and CSS to your style.css), or spit out an image, or whatever is you want to change for new posts.

    That’s the overview. Obviously, specifics are up to you.

    Bill, I got bored. Try this on for size:

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add a “new” button to most rcent posts?’ is closed to new replies.