Displaying Locations on Your Site

Did you know that you can display your location(s) information on your site?

It’s really easy to do using our widgets, blocks, shortcodes, or even PHP code.

Let’s start by looking at the widgets included in the Local Business SEO addon.

Local Business SEO Widgets

To use the widgets, go to Appearance » Widgets in your WordPress admin area.

Click the plus ( + ) sign in the widget area where you want to add the map and search for AIOSEO Local. Click on the widget in the search results that you want to add.

Add AIOSEO Local widgets on the Widgets screen

Let’s look at each of the three widgets, starting with the Business Info widget.

Business Info Widget

The Business Info widget will display information about your business.

If you have Multiple Locations turned off, then it will display the information entered in the Local SEO settings of All in One SEO.

If you have Multiple Locations enabled, then you can select which location you want to display using the Location drop down.

The first field is the Title field. This is the title for your widget and it will be displayed above the widget contents on your site.

Business Info widget showing Location drop down

Next, you’ll see check boxes for Show labels and Show icons.

If checked, the Show labels check box will display the name of each field from the location information above the value, i.e. Address, Phone, Email, etc.

You can edit the labels in the Labels fields.

Business Info widget showing Labels fields

If checked, the Show icons check box will display icons to the left of the location information.

Business Info widget displayed on the front end of a site

Next, you’ll see check boxes for each item of information you can display for a location. Use these to control what you want to display on your site.

Business Info check boxes in the Business Info widget

Finally, you’ll see a field for After widget text. You can optionally enter any text you want here and it will be displayed below the widget contents.

Opening Hours Widget

The Opening Hours widget will display the opening hours for your business.

If you have Multiple Locations turned off, then it will display the information entered in the Opening Hours tab of the Local SEO settings of All in One SEO.

If you have Multiple Locations enabled, then you select can select which location you want to display using the Location drop down.

The first field is the Title field. This is the title for your widget and it will be displayed above the widget contents on your site.

Opening Hours widget showing Location drop down

Next, you’ll see check boxes for Show title and Show icons.

If checked, the Show titles check box will display the words “Our Opening Hours” above the list of hours. You can change this title in the Label field.

Opening Hours widget showing Label field

If checked, the Show icons check box will display a clock icon above the list of hours.

Opening Hours widget displayed on the front end of a site

Next, you’ll see check boxes for each day of the week. Use these to control which days you want to display opening hours for on your site.

Opening Hours check boxes in the Opening Hours widget

Finally, you’ll see a field for After widget text. You can optionally enter any text you want here and it will be displayed below the widget contents.

Locations by Category Widget

The Locations by Category widget will list all locations in the selected location category. This widget only works if you have Multiple Locations enabled.

Locations by Category widget settings

The first field is the Title field. This is the title for your widget and it will be displayed above the widget contents on your site.

Then, select the category in the Category drop down. All in One SEO will display a list of the locations in that category on your site and each list item will link to that location.

Locations by Category displayed on the front end of a site

Local Business SEO Blocks

You can use the Local Business SEO blocks any where you’re using the WordPress Block editor.

There are four blocks similar to the widgets detailed above, these are:

  • AIOSEO Local – Business Info
  • AIOSEO Local – Opening Hours
  • AIOSEO Local – Locations
  • AIOSEO Local – Location Categories
Local Business SEO blocks in the Block editor

Add the block to your content and configure the settings in the sidebar.

Let’s look at each of the blocks, starting with the Business Info block.

Business Info Block

The Business Info block will display information about your business.

If you have Multiple Locations turned off, then it will display the information entered in the Local SEO settings of All in One SEO and there will be no settings in the sidebar.

If you have Multiple Locations enabled, then you select can select which location you want to display using the Location drop down in the sidebar.

Business Info block showing Location drop down and settings

You’ll see toggles for Show labels and Show icons in the sidebar.

If enabled, Show labels will display the name of each field from the location information above the value, i.e. Address, Phone, Email, etc.

You can change these labels in the Labels section of the block settings.

Labels settings in the Business Info block

If enabled, Show icons will display icons to the left of the location information.

Business Info widget displayed on the front end of a site

Next, you’ll see toggles for each item of information you can display for a location. Use these to control what you want to display on your site.

Business Info toggles in the Business Info block settings

Opening Hours Block

The Opening Hours block will display the opening hours for your business.

If you have Multiple Locations turned off, then it will display the information entered in the Opening Hours tab of the Local SEO settings of All in One SEO and there will be no settings in the sidebar.

If you have Multiple Locations enabled, then you select can select which location you want to display using the Location drop down.

Opening Hours block showing Location drop down

Next, you’ll see toggles for Show title and Show icons.

If enabled, Show titles will display the words “Our Opening Hours” above the list of hours. You can change this title in the Label field.

If enabled, Show icons will display a clock icon above the list of hours.

Opening Hours widget displayed on the front end of a site

Next, you’ll see toggles for each day of the week. Use these to control which days you want to display opening hours for on your site.

Opening Hours toggles in the Opening Hours block settings

Locations Block

The Locations block will list all locations in the selected location category. This block only works if you have Multiple Locations enabled.

Locations block showing the Location Category drop down in the settings sidebar

Select the category in the Location Category drop down and All in One SEO will display a list of the locations in that category on your site and each list item will link to that location.

Locations by Category displayed on the front end of a site

Location Categories Block

This block will display a list of your Location Categories and each item in the list will link to that category page. There are no settings for this block.

Local Business SEO Shortcodes

If you’re not using the WordPress Block editor then you can use shortcodes to display the exact same information on your site.

There are three shortcodes which match the widgets and blocks described above. You can find details of the shortcodes and how to use them at the links below:

Local Business SEO PHP Code

Finally, we also have PHP code you can use in the theme templates in your theme.

There are three sets of code which match the widgets and blocks described above. You can find details on how to use them at the links below:

You can find details on how to display a Google Map of your locations on your site here.

There is no legacy documentation for this as it was added in All in One SEO v4.1.0.