But, correct me if I am wrong, that tells you if the current URL is a page.
For example, user brings up http://blogserver/. If I check is_page(‘contact’), that will fail because / is not (likely) the page named ‘contact’.
Here’s the whole story:
The theme displays the admin email for a “contact” link. But, some blogs on my system use the “WP-ContactForm” plugin. I have them setup to use a page named “Contact” to display this contact page. So, what I want to do: if the blog loading has a “Contact” page, create the contact link to that page rather than an email address.
It would be nice if WP had an “if page exists” or a similar function built-in. I am looking for a way to incorporate a certain feature into some of my themes if a page exists matching entries in a set list of slugs.
<?php if(get_page_by_title('Page Title')) : ?>
[do stuff]
<?php endif;?>
<?php if(get_page_by_title(‘Page Title’)) : ?>
[do stuff]
<?php endif;?>
this is wonderful… it helped me as well, thanks!