Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff

    (@macmanx)

    Why not do this instead?

    <a href="http://localhost:8080/gobiernoabiertoII/?page_id=895">2016</a>

    Thread Starter bgva2005

    (@bgva2005)

    Hi James Huff
    I know that is going to work but I want ot understad what is hapening, why is the reason that is not working because in another page that option work withou problem.

    Moderator James Huff

    (@macmanx)

    Well, the reason it isn’t working is because <a href="/index.php?p=895"> is a relative URL. It inherits whatever the URL in the browser currently is.

    So, let’s say that link is in a post lets called it example.com/2016/05/08/test/

    When clicked while viewing the post directly, the result will be example.com/2016/05/08/test//index.php?p=895

    When clicked while viewing the post on the main page at example.com, the result will be example.com/index.php?p=895

    When clicked while reading your RSS feed in the web-based feed reader https://www.newsblur.com/ the result will be newsblur.com/index.php?p=895

    Which is all to say why relative links are terrible and you should never use them. 😉

    Always use absolute links, like <a href="http://localhost:8080/gobiernoabiertoII/?page_id=895">

    Thread Starter bgva2005

    (@bgva2005)

    Thanks James Huff, I am going to follow you advice.

    Moderator James Huff

    (@macmanx)

    You’re welcome!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘wordpress link problem’ is closed to new replies.