<pre style="lang:php title="Template URL Helper">
//returns the URL of a page where the template filename contains $template_string
// if multiple pages use the page template, it will only return one

function icreate_get_template_link( $template_string ) {
$args = array(
'post_type' =&gt; 'page',
'meta_key' =&gt; '_wp_page_template',
'meta_value' =&gt; $template_string,
'meta_compare' =&gt; 'LIKE',
'posts_per_page' =&gt; 1
);

$page_array = get_posts( $args );
if ( ! is_array( $page_array) ) {
return false;
}

$page = $page_array[0];
$page_id = $page-&gt;ID;
return get_permalink( $page_id );
}
</pre>