add this code in plugin main page
if ( is_admin() || in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) ) {
return;
}
1. Is single check in plugin or
2. How to use is_single and get_post_type within a plugin?
function plugin_function(){
if(!is_single()) {
return;
}
}
add_action('wp', 'plugin_function');
http://wordpress.stackexchange.com/questions/65252/how-to-use-is-single-and-get-post-type-within-a-plugin
if ( is_admin() || in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) ) {
return;
}
1. Is single check in plugin or
2. How to use is_single and get_post_type within a plugin?
function plugin_function(){
if(!is_single()) {
return;
}
}
add_action('wp', 'plugin_function');
http://wordpress.stackexchange.com/questions/65252/how-to-use-is-single-and-get-post-type-within-a-plugin