Home>Support>Get Links with variable

Get Links with variable

By chimera, 6 years ago. Last reply by Alex S, 6 years ago.

Hello,

i have the Vantage Pro and use it since several month.
I have now one problem.
There are some links which are absolute. When i load my online page now offline these links do not work.
Is there any possibility to make a variable for the homepage or the home_url to link it with the path.
Then it would work locally and also online.

Everything which i found in the internet like “getHome_url()” did not worked.

Is there any way to use a theme variable for these?

Greetings Alex

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 6 years, 5 months ago chimera

    Hello,

    is there a problemw with my question?
    I think it is a general wordpress topic to make somehow a homepage reference like <>/test/../page
    So something that i change the home link in the sql and then it will work on the server and locally.

    I wish you a nice rest of the day.

    Kind regards Alexander

  2. 6 years, 5 months ago Alex S Hi, I Work Here

    Hi Chimera,

    I’m very sorry about this but for some reason, your post wasn’t in the queue. I can’t explain why, nor can I excuse this. I’m very sorry that I didn’t get to your question sooner. This should be a good time to mention that as you’re a Vantage Premium user you’re entitled to priority email support. If you would like to make use of that please follow the instructions found on this page. Please reference this thread.

    Now unless you’re editing the theme on a code level I would instead recommend a simple, / I know that must sound strange but if you add a text menu, or a text link and start it with / it will tell the browser that this link is on the current domain and to start on the base of the domain.

    So, for instance, say you’re on example.com/example-directory/example-page If the user clicks on a link that links to /other-directory/example-post it will be treated the same as if you had directly linked to example.com/other-directory/example-post.

  3. 6 years, 5 months ago chimera

    Hello,

    thank you very much for your fast feeback later.

    I was now delaying these matter a lot.
    I totally forgot that i am a premium user :-)

    Next time I will make use of the direct support. Thank you for all the Informations. These is a great help.

    :-)

    I wish you a nice rest of the day.

    Kind regards Alexander

  4. 6 years, 4 months ago chimera

    Hello,

    i tested now the solution with the / and it workes in general. But not for my case.
    You see i need to open the localhost/”Folder”
    And the “Folder” is the one under htdocs (I use XAMPP).
    So if i change now http://“Domain URL”/Kontakt to /Kontakt it will call the side http://localhost/Kontakt.
    But to work it should call: http://localhost/“Folder”/Kontakt.

    Do you have any other idea how to get these working?

    Greetings Alex

  5. 6 years, 4 months ago Alex S Hi, I Work Here

    Hi Chimera,

    You should be able to make use of /FOLDERNAME/ then. Personally, I wouldn’t worry about it and use a plugin like Duplicator to handle updating your links when you push the site live.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More