Forums

Day Counter - Posted on Day 2 etc (3 posts)

  1. totalbigbrother
    Member
    Posted 2 years ago #

    Hi, guys.

    I'm running a Big Brother website (Big Brother launches tomorrow).

    On the site i have a heading on the single page with a custom string that gets the data we input through the dash board.

    The custom string is -

    <?php $day = get_post_meta($post->ID, "day", $single = true);
    if ( $day ) { echo $day; } else { the_time('D j F'); } ?>

    I was wondering if they was a script i could use to get the day that we posted the story automatically. - In the form of Day: 1, Day: 2 etc.

    For example, on the sidebar we have a javascript that brings up the current "day number" in terms of days the house (Today being Day: -1)

    If i put this javascript in place of the custom string, no matter if the article was posted 5 weeks ago, the date still shows the day for today.

    I hope this makes sense and appreciate any help. - i have used the search function prior to posting.

    For reference, the "day script" can be found here:
    http://totalbigbrother.com/js/daycount.js

  2. totalbigbrother
    Member
    Posted 2 years ago #

    Hi, Does anybody know if this is possible?

    Thanks

  3. alecish
    Member
    Posted 2 years ago #

    bump :)

Topic Closed

This topic has been closed to new replies.

About this Topic