WordPress.org

Ready to get started?Download WordPress

Forums

If Date is --- Show Message (4 posts)

  1. plz.help.me
    Member
    Posted 4 years ago #

    EX:
    If it is from 2008 and back,
    show message in div.

    Are there conditional tags capable of this or a plugin?

  2. Wex
    Member
    Posted 4 years ago #

    Sure. get_the_time() is probably your best option. You'd probably want to do something like:

    <?php if(get_the_time('Y') <= 2008): ?>
    Message here...
    <?php endif; ?>

    Reference:
    http://codex.wordpress.org/Template_Tags/get_the_time

  3. plz.help.me
    Member
    Posted 4 years ago #

    Thanks!

  4. Wex
    Member
    Posted 4 years ago #

    Sure thing.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.