• I need a <a href="Something Like <?get_contact_page>">Contact Page</a> Code that always links to the Contact page, no matter what is it’s ID

    There’s a page template for contact page.

    Is it possible to do this?

    I’ll gladly provide any further information you need 🙂

    Thanks!!

Viewing 1 replies (of 1 total)
  • It’s really not possible to do this in an easy way. Your contact page can change which means that it’s ID is never set in the system.

    The only way that I’d think about doing this is complicated, but will work. You’d need to set up a new area in your page’s admin areas using add_meta_box() and set this with a checkbox to signify that this page is the contact page. Then store that pages ID using update_option(). that way you can create youre own function that will get that option value and enable to you retrieve the permalink for that page ID.

Viewing 1 replies (of 1 total)
  • The topic ‘Dynamic href link to Contact Page’ is closed to new replies.