if is home page code example
Example 1: is frontpage wordpress
if ( is_front_page() ) :
get_header( 'front' );
else :
get_header();
endif;
Example 2: if home else php wordpress
if ( is_user_logged_in() ):
echo 'Welcome, registered user!';
else:
echo 'Welcome, visitor!';
endif;