GetSimple Support Forum

Full Version: How to add <?php get_site_url(); ?> to pages?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all,
Since we can't use PHP in pages, I'm trying to find an alternative to add <?php get_site_url(); ?> to pages. I'll move to website to another host so I don't want to change every link manually.

Thanks.
There are some plugins that can do a global migration for you
You don't add that to pages. You add it to the theme's template files.
They mean they do not want absolute urls in their links in page content.
There are some mods you can do to change your siteurl to relative...
(2016-06-29, 00:14:44)shawn_a Wrote: [ -> ]They mean they do not want absolute urls in their links in page content.
There are some mods you can do to change your siteurl to relative...

Yes this is what I'm talking about.
What mods are they exactly?
You can remove the input type =url from the site settings and add a relative url there instead of full. Search the forums, it was recently discussed.
(2016-06-29, 00:46:29)shawn_a Wrote: [ -> ]You can remove the input type =url from the site settings and add a relative url there instead of full. Search the forums, it was recently discussed.

I'm sorry, I could not find no matter what I wrote...
This must not be that difficult thing to do.  Huh
I searched relative url
First result excluding this thread

http://get-simple.info/forums/showthread...l#pid56600
I thought this plugin of yours is about that:
http://get-simple.info/extend/plugin/gsc...eurls/900/
Haha when did I make that?
Thanks @shawn_a! This is easy yet effective method.

However deleting root url from settings may cause problems if pretty url settings are like "parent/slug". I do suggest to use only slug, no parent directory in url to everyone who's gonna use this method.
How so, it should not, permalinks are generated from permalink structure, not site url.

Also try that plugin out, i forgot about it, but it only affects links, not image paths, so probably not what you want.
There are some other migration plugins listed here:

http://get-simple.info/wiki/plugins:guide#migration