Guest User

Untitled

a guest
May 31st, 2016
47
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_action('wp', 'check_home');
  2. // or add_action('init', 'check_home');
  3.  
  4. function check_home($param)
  5. {
  6. if (is_home()):
  7. echo 'User is on the homepage.';
  8. else:
  9. echo 'User is not on the homepage';
  10. endif;
  11. }
RAW Paste Data