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!';
}