This is a very useful snippet to execute something based on a WordPress Conditional statement.  


See all statements at https://codex.wordpress.org/Conditional_Tags 


This can be placed in any PHP file.

 

<?php if ( is_front_page()  ) { ?>
  DO SOMETHING HERE
<?php } else { ?>
DO SOMETHING ELSE
<?php } ?>