Sage 9 Site URL Shortcode

Hello again. And again sorry for my basic question.

¿How can i do a [SiteUrl] shortcode in Sage 9? I try with some plugins and writing in functions.php, but nothing.

One option would be the syntax for displaying an unescaped variable:

{!! do_shortcode('[SiteUrl]') !!}

https://laravel.com/docs/5.6/blade#displaying-data

To get the Site Url, you can also just use the site_url() function like so:

{!! site_url() !!}

A little cleaner than using a shortcode.

Hope this helps.

A

4 Likes