• Resolved Antal Tettinger

    (@antaltettinger)


    Hello Vladimir!

    We have an interesting issue maybe for you it is something very easy to solve.
    We have inserted some shortcodes buttons similar to this with links in them:
    [su_button url=”/letsgo/here”]Button text[/su_button]

    When we do WP_Query search and displaying the search results from another site on the multi site network it doesn’t show the URL for the site where the link is in the search results, but the site where the search was made.

    So for example I have declared the button on site-b.com.
    When I do a search on site-b.com, then the button URL will be site-b.com/letsgo/here instead of site-a.com/letsgo/here

    Sorry to bother you with this it might be some simple solution, but how could we make sure that the site URL stays the same for these shortcode buttons and doesnt change?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Vova

    (@gn_themes)

    Hello Antal,

    this is how browsers work. If you’re using an URL like /example, the browser will display it as siteA.com/example on siteA.com and as siteB.com/example on siteB.com. Just use absolute URLs, like so: https://siteA.com/example.

    The Button shortcode only displays a styled link (the <a> tag) and it does nothing with your URL.

    Thread Starter Antal Tettinger

    (@antaltettinger)

    Hello Vladimir,

    Makes total sense, just wanted to double-check with you since you are a real pro!
    Thanks, will be using absolute paths then.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Button shortcode URL’ is closed to new replies.