Adding 'NEW' icon to the latest posts in Wordpress

1) Open the file 'inc_boardlist.inc' in your theme folder.

2)Put below codes to the right place (Don't forget '<?php' and '?>').

 $current_time = time(); //Get current Unix timestamp 
 $posting_time = get_the_time('U'); //Get Unix timestamp of posting time
 $thishall = $current_time - $posting_time;

 if( $thishall <= 86400) //if posting time is within 24 hours
  echo "";


No comments:

Post a Comment