GetSimple Support Forum
How to add <?php get_site_url(); ?> to pages? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: How to add <?php get_site_url(); ?> to pages? (/showthread.php?tid=8539)



How to add <?php get_site_url(); ?> to pages? - barknezz - 2016-06-28

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.


RE: How to add <?php get_site_url(); ?> to pages? - shawn_a - 2016-06-29

There are some plugins that can do a global migration for you


RE: How to add <?php get_site_url(); ?> to pages? - datiswous - 2016-06-29

You don't add that to pages. You add it to the theme's template files.


RE: How to add <?php get_site_url(); ?> to pages? - shawn_a - 2016-06-29

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...


RE: How to add <?php get_site_url(); ?> to pages? - barknezz - 2016-06-29

(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?


RE: How to add <?php get_site_url(); ?> to pages? - shawn_a - 2016-06-29

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.


RE: How to add <?php get_site_url(); ?> to pages? - barknezz - 2016-06-29

(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


RE: How to add <?php get_site_url(); ?> to pages? - shawn_a - 2016-06-29

I searched relative url
First result excluding this thread

http://get-simple.info/forums/showthread.php?tid=8471&pid=56600&highlight=Relative+url#pid56600


RE: How to add <?php get_site_url(); ?> to pages? - datiswous - 2016-06-29

I thought this plugin of yours is about that:
http://get-simple.info/extend/plugin/gsckerelativeurls/900/


RE: How to add <?php get_site_url(); ?> to pages? - shawn_a - 2016-06-29

Haha when did I make that?


RE: How to add <?php get_site_url(); ?> to pages? - barknezz - 2016-06-29

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.


RE: How to add <?php get_site_url(); ?> to pages? - shawn_a - 2016-06-29

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.


RE: How to add <?php get_site_url(); ?> to pages? - datiswous - 2016-06-30

There are some other migration plugins listed here:

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