In this documentation tutorial, we’ll walk you through using the [aio_home_url] shortcode to effortlessly display your WordPress website’s home URL in different formats dynamically.

With the user-friendly AIO Shortcodes plugin, integrating your site’s homepage URL is a breeze using a simple shortcode that fetches precise data from WordPress Admin » Settings » General » Site Address (URL).

Let’s dive in.

Getting Started With WordPress Home URL Shortcode

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

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

Basic Use Of Home URL Shortcode

Using the [aio_home_url] shortcode to display your website’s homepage 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 homepage link is always up-to-date without requiring manual updates.

Advanced Options And Attributes

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

Using the ‘link’ Attribute:

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

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

  • Input: [aio_home_url link="no"]
  • Output: https://aioshortcodes.com/the website homepage URL without a clickable link

Using the ‘new_window’ Attribute:

The ‘new_window‘ attribute in the WordPress home URL shortcode [aio_home_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_home_url new_window="yes/no"], allowing you to control whether the homepage URL (link) opens in a new window or not.

  • Input: [aio_home_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_home_url link="yes" new_window="no"]
  • Output: https://aioshortcodes.com/the homepage URL of the website with a link that opens in the same window

Note: Either [aio_home_url] or [aio_home_url link="yes"] works the same way.

Utilize these combinations of attributes inside the shortcode to effectively showcase the homepage 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_home_url] shortcode with/without attributes:

InputOutputDescription
[aio_home_url]https://aioshortcodes.com/Output the site URL with default values
[aio_home_url link="yes"]https://aioshortcodes.com/Default – output WordPress site URL having a clickable link
[aio_home_url link="no"]https://aioshortcodes.com/Output WordPress site URL without a link (or write it as plain text)
[aio_home_url new_window="no"]https://aioshortcodes.com/Default – output site URL link that opens in a same window
[aio_home_url new_window="yes"]https://aioshortcodes.com/Output site URL link that opens in a new window
[aio_home_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 illustrates different ways to use the WordPress homepage URL shortcode.

Adjust it to display the current website address 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.