In this comprehensive article, we’ll guide you through using the [aio_site_url] shortcode to display your WordPress website’s URL in different formats dynamically.

With the user-friendly AIO Shortcodes plugin, you can seamlessly integrate your site’s URL using a simple shortcode that retrieves the exact data from WordPress Admin » Settings » General » Site Address (URL).

Let’s get started.

Getting Started With WordPress Site URL Shortcode

Before using the [aio_site_url] shortcode, ensure you’ve installed and activated the AIO Shortcodes plugin on your WordPress website.

This exclusive shortcode allows you to effortlessly display your website’s URL across various elements, including posts, pages, headers, footers, sidebars, and widgets.

Basic Use Of Site URL Shortcode

Utilizing the [aio_site_url] shortcode to display your website’s URL is straightforward. Here’s how it works:

Simply insert the shortcode anywhere on your site, and it’ll automatically display the current website URL. This ensures that your website URL is always up-to-date without requiring manual updates.

Advanced Options And Attributes

The Site URL shortcode comes with advanced options to further customize its functionality.

Using the ‘link’ Attribute:

The ‘link‘ attribute in the shortcode [aio_site_url link="yes/no"] determines whether the website homepage URL should be linked or not. The default value is ‘yes‘, meaning the website URL is displayed as linked.

The basic format is: [aio_site_url link="yes/no"], allowing you to control whether the title is a clickable link or not.

  • Input: [aio_site_url link="yes"]
  • Output: https://aioshortcodes.com/(default – the URL of the current website with a clickable link)
  • Input: [aio_site_url link="no"]
  • Output: https://aioshortcodes.com/ – (the URL of the current website without a clickable link)

Note: Either you write [aio_site_url] or [aio_site_url link="yes"] works the same way.

Using the ‘new_window’ Attribute:

The ‘new_window‘ attribute in the page title shortcode [aio_site_url new_window="yes/no"] specifies if it will open in a new window or not. The default value is ‘no‘, meaning the link opens in the same window.

The basic format is: [aio_site_url new_window="yes/no"], allowing you to control whether the site URL (link) opens in a new window or not.

Attention: To utilize the ‘new_window‘ attribute in [aio_site_url] shortcode, it’s crucial to set the ‘link‘ attribute to ‘yes‘ – as linking the text is necessary for opening it in a new window.

  • Input: [aio_site_url link="yes" new_window="yes"]
  • Output: https://aioshortcodes.com/(the homepage URL of the website with a link that opens in a new window)
  • Input: [aio_site_url link="yes" new_window="no"]
  • Output: https://aioshortcodes.com/(the title of the page with a link that opens in the same window)

👇 Here are some notes to consider – either you write:

  • [aio_site_url] or [aio_site_url link="yes"] works the same way
  • [aio_site_url] or [aio_site_url new_window="no"] works the same way

Utilize these combinations of attributes inside the shortcode to effectively showcase the site URL within the content on your WordPress website.

Shortcode Combinations & Output Samples Table

Here’s the complete table structure of different examples of using the [aio_site_url] shortcode with/without attributes:

InputOutputDescription
[aio_site_url]https://aioshortcodes.com/Output the site URL with default values
[aio_site_url link="yes"]https://aioshortcodes.com/Default – output WordPress site URL having a clickable link
[aio_site_url link="no"]https://aioshortcodes.com/Output WordPress site URL without a link (or write it as plain text)
[aio_site_url new_window="no"]https://aioshortcodes.com/Default – output site URL link that opens in a same window
[aio_site_url new_window="yes"]https://aioshortcodes.com/Output site URL link that opens in a new window
[aio_site_url link="yes" new_window="yes"]https://aioshortcodes.com/Output the site URL having a clickable link that opens in a new window

The table above shows different ways to use the WordPress site URL shortcode.

You can adjust it to display the current website homepage link, with the flexibility to present it in various text/link formats and choose whether it opens in a new window or not.

Still not using AIO Shortcodes?

Install our plugin to boost your site’s content SEO, automate your affiliate marketing, and lots more, just by using these simple WordPress shortcodes.