Forums

Getting current month of posts to show up (2 posts)

  1. illusime
    Member
    Posted 4 months ago #

    I need a piece of code that will show some text when the system month and year is same as the posted article. How do I do that? I tried with the code below but it doesn't work. Can anyone help? Thanks.

    $postmonth=the_date('mY');
    $curmonth=date('mY');
    if($postmonth == $curmonth){
    echo 'Great!';
    }

  2. esmi
    Member
    Posted 4 months ago #

Reply

You must log in to post.

About this Topic

Tags