Created
October 19, 2016 15:23
-
-
Save adeel-raza/61ca2be86c7befac0015a8fbd76c5a02 to your computer and use it in GitHub Desktop.
Load content based on the condition that whether its the WP backend or frontend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { | |
// run Backend only code here | |
} else { | |
// Frontend code here, this will include the ajax calls | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment