0

Situation: I'm using the default description field on a page in visual mode. I'm trying to link the words "news page" to the my news page. I pick the News page from the content list that is offered to me in the Insert/edit pop-up window. The url field is filled with:

http://belgianstrokecouncil.be/news/

(generates a full url in the top url field of the pop-up window)

, while generating the address link

/news/

would make more sense. Hardcoded links make life difficult after domain name changes.

Why does the default Insert/edit link function in Visual mode in posts or pages make you use the full URL instead of just using the last part of the address?

I can off course switch to Text mode and simply edit the url to be /news/, but that would defeat the purpose of using an easy insert/edit url function.

Maybe it's a setting, maybe there's a plugin, maybe I'm doing it wrong. The last one being more likely. :)

Kind regards,

  • There's some discussion of why relative URLs are "considered harmful" here -- Why relative URLs should be forbidden. It touches on WP's preference for generating full URLs as well as the fact that it tries to create a 301 Redirect for any relative URLs that it discovers. – Pat J Jun 21 '14 at 2:47
0

Your forgetting the Pages are stored in the Database. The database does not use relative linking. You can control the output by Activating PrettyPermalinks. For moving a domain you must use a Database Backup/Restore Plugin and modify wp-config.php should the database name change

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.