Can is_page() be combined with a switch control structure?
While Ben’s answer is basically correct, is_page also checks to make sure that the query is indeed a Page and not something else with the same post_name. So to be 100% accurate, you could do something like this: if ( is_page() ) { // only do this for actual pages $page_obj = get_queried_object(); switch ( … Read more