How to create a fixed link in wordpress?

3

I'm implementing a static html site for wordpress, it's not all the pages that need cms to manage the content, my problem is this!

I can not create a Menu link for a static page or any other page Wordpress 4

example

<a href="contato.php">contato</a>
Simplesmente ele não consegue encontrar a página contato.php

In the best of the worlds this should work because I have tried because they are all in the same directories, I already saw in the codex that wordpress works differently but I already tried several solutions and nothing, someone can give a help.

    
asked by anonymous 26.09.2014 / 22:22

2 answers

1

After creating the wordpress admin page in the href attribute you should put the path as follows

<a href="<?php bloginfo('url')?>/nomeDaPagina">Link da pagina</a>
    
22.12.2014 / 23:42
3

From the link that you put, it looks like the contact.php is like a relative link . This means that the browser will search the page depending on the current path you are navigating.

Example, if you are in yourite.com /categoria/artigo/
The link above will be yoursite.com /categoria/article/contact.php

If you are in yoursite.com / over /
The link will be: suaite.com.br/sobre/contato.php

So, you just put the full path to your contact.php. For example, if you put the file inside the root of the domain, the link is:

<a href="/contato.php">contato</a>

(Also, in your original post, you closed the tag with < / p > instead of < / a >)

So, check exactly where the page you want to link to is (via the same browser) and use the relative link correctly.

    
27.09.2014 / 05:12