I cannot get working my code and I thought that best way is asking here.
so as on the title
Im looking to create a function (link for a specific template file) for my template-contact.php
Tried to do with this function wich I found in another topic but it didnt work.
function get_contact_page() {
$contact_page = get_pages(
array(
'meta_key' => '_wp_page_template',
'meta_value' => 'template-contact.php'
)
);
$contact_id = $showcase_page[0]->ID;
echo get_permalink( $contact_id );
}
but when I use
<a href="<?php echo get_contact_page(); ?>" class="widget" data-toggle="tooltip" data-placement="bottom" data-title="CONTATTO"><span
class="ico ico-phone-btn"></span></a>
does nothing. Thanks for all your help