If you want to find current page type use get_post_type()
. the function is_single()
is not used for checking the post type , it is used to check weather you are on a single post page or not. It returns true when you are on a single post page else false.
↧
Answer by Adeel Raza for Wordpress Conditional Tags in Theme's function.php file
↧