Enlace entre páginas en wordpress

Hi I am trying to link to some custom templates I have created and I don't seem to know how to do it the right way.For example:

I have created a custom contact page and named it contact.php.From the front-page I want to link to it.Now this is what I did but I don't think this is the best way:

<a href="<?php bloginfo('url') ?>/contact">

Now this works but only if the permalinks are set in the settings page to postname.If for example the page is set to default the links shows the 404.php.

How can I set the links the right way?

I noticed that when creating custom post types there is a way to rewrite the permalinks and define a slug for the new page.Is there a similar way to rewrite permalinks for custom templates?

preguntado el 25 de agosto de 12 a las 10:08

1 Respuestas

You have to use get_page_link() function instate Here you can see details


Muchas Gracias

Respondido 25 ago 12, 12:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.