Site in subfolder – will hardcoded links have to be edited once its live?
-
Hi All,
I have been building my site in a subfolder https://www.mysite.com/wp/ and I have hardcoded links in the pages so the client can test out the site. The problem is when I make the site live (by changing the “Site address (URL)” in settings etc…)all the hardcoded links will still have the /wp/ in them.
This seems like a problem everyone would have who is working on a site in a subfolder and then it goes live.
I was hoping I could add PHP code to my hardcoded links so it automatically put in the site address that is set in settings. But WP doesn’t seem to like it when I added in this code. The link and all just disappeared.
<a href="<?php bloginfo('url'); ?>/?page_id=125">LINK ONE</a>
If someone could let me know if I will have to change all 100 links across the site after its live or is there a way to do it automatically like my example.
Thanks in advance.
Anadac
- The topic ‘Site in subfolder – will hardcoded links have to be edited once its live?’ is closed to new replies.