Move is_front_page() call
Correctly use add_action(), add comment