Select Page

Use this to target code if a certain page exists, useful to show gallery images in a sidebar if there is a gallery page.

 
<?php 
if(get_page_by_title('Gallery')) :
{code here}
endif;
?>