Simply paste the function below into your functions.php file: function hasgallery(){ global $ post; return (strpos($ post->post_content,'[gallery') !== false); } Once done, you can use it ... Read More
Simply paste this code into your functions.php file: function is_custom_post_type() { global $ wp_query; $ post_types = get_post_types(array('public' => true,'_builtin' => false),'names','and'); foreach ($ post_types as ... Read More