Warning when author has no post
Try wrapping the rsort bit in an if statement like this: if (!empty($post_dates)) { rsort($post_dates); } else { echo ‘optional error message here’; } This will check to see if the variable is empty first, and only run rsort() if it is not empty. This check works most of the time, but a false positive … Read more