Need a little bit help with wordpress script

1 replies
I didn´t know any other forum that so many smart people are viewing so
I need a little bit help with changing this script so i want it to display the day today, but it is displaying the day when the page was made.

the code looks like this

<div class="post">

<div class="posttop">
<div class="dateicon">
<div class="day"><?php the_time('d') ?></div>
<div class="month"><?php the_time('M') ?></div>
</div>

i dont want to send the link to the site because i dont know if i will get banned or not.. so if you want to see how this is on the site i will send you pm or post it on the forum if i am allowed to.

thx people on warrior forum
#bit #script #wordpress
  • Profile picture of the author TrafficGuy Claude
    You need to format your php the_time function. You can use the following characters:

    • l = Full name for day of the week (lower-case L).
    • F = Full name for the month.
    • j = The day of the month.
    • S = The English suffix for the day of the month (e.g st, nd or th in the 1st, 2nd or 15th.)
    • Y = The year in 4 digits. (lower-case y gives the year's last 2 digits)
    So

    Code:
    <?php the_time('l, F jS, Y') ?>
    Would give you the following output:

    Code:
    Monday, February 23rd, 2009
    {{ DiscussionBoard.errors[546418].message }}

Trending Topics