Use:
if ( is_home() or ( defined( 'DOING_AJAX' ) && DOING_AJAX ) )
is_home()
returns TRUE
on the front-end only, admin-ajax.php
on the other hand is an admin page. So you need to check both conditions.
Use:
if ( is_home() or ( defined( 'DOING_AJAX' ) && DOING_AJAX ) )
is_home()
returns TRUE
on the front-end only, admin-ajax.php
on the other hand is an admin page. So you need to check both conditions.