Shortcodes in Multi Location Product & Inventory Management for WooCommerce make it simple to add dynamic features like store selectors, product filters, and location details anywhere on your site. They are easy to use, customizable, and help improve customer experience by showing relevant store and product information.
What is a Shortcode?
A shortcode in WordPress is a simple text snippet wrapped in square brackets (e.g., [example_shortcode]). Shortcodes let you add dynamic content or plugin features into posts, pages, or widgets without writing code.
For example:
[mulopimfwc_location_info]
This shortcode will display store location details with maps and contact info.
How to Use Shortcodes
You can place shortcodes in different areas of your site:
- Shop Page Header/Footer
- Go to your shop page.
- Click Customize.
- Go to the header/footer section.
- Add a widget named Shortcode.
- Paste the shortcode you want to use.
- Custom Page
- Open the page editor.
- Search for the Shortcode widget.
- Place it anywhere depending on your layout needs.
- Elementor Page Builder
- Open the page in Elementor.
- Search for the Shortcode widget.
- Paste the shortcode you want to apply.
Shortcodes Overview of This Plugin
The Multi Location Product & Inventory Management for WooCommerce plugin provides six main shortcodes:
- Store Location Selector – Dropdown for visitors to select their desired store.
- Location Selector for Specific Product – Show available locations for a single product.
- Location Status Badge – Display open/closed badge for a store location.
- Store Locator Information – Show store info like address, contact details, and maps.
- AJAX Product Filter – Add AJAX-powered product filters by location and stock status.
- Location Recommendations – Display location‑wise product recommendations based on popularity and customer insights.
1. Store Location Selector
Shortcode: [mulopimfwc_store_location_selector]
Purpose: Creates a dropdown box that can be placed anywhere. Visitors can select their desired location or store from the dropdown.
Parameters:
| Parameter | Values | Description | Example |
|---|---|---|---|
title | Text | Custom selector title | title="Choose Store Location" |
show_title | on / off | Display or hide the title | show_title="on" |
use_select2 | on / off | Enable enhanced dropdown with search | use_select2="on" |
herichical | on / off / separately | Show hierarchical location structure | herichical="on" |
show_count | on / off | Show product count per location | show_count="on" |
class | Text | Add custom CSS class for styling | class="location-selector-custom" |
enable_user_locations | on / off | Allow users to save preferred locations | enable_user_locations="on" |
max_width | Number (px) | Set maximum width of dropdown | max_width="300" |
multi_line | on / off | Display selector in multiple lines | multi_line="on" |
Explore the Store Location Selector Shortcode Guide for detailed usage and styling options.
2. Location Selector for Specific Product
Shortcode: [mulopimfwc_location_selector]
Purpose: Allows you to show locations for a single product. Especially helpful when you want to show available locations for a product on a landing page.
Parameters:
| Parameter | Values | Description | Example |
|---|---|---|---|
product_id | Product ID (number) | Shows locations for a specific product. If not provided, auto-detects current product. | product_id="123" |
layout | list / buttons / select | Choose how the selector is displayed | layout="buttons" |
label | Text | Custom label displayed above the selector | label="Choose Store:" |
Check out the Location Selector for Specific Product Guide to learn how to highlight product availability across branches.
3. Location Status Badge
Shortcode: [mulopimfwc_location_status]
Purpose: Displays a badge for the location showing if it is open or closed.
Parameters:
| Parameter | Values | Description | Example |
|---|---|---|---|
id | Location term ID | Target a location by its numeric ID | id="123" |
slug | Location term slug | Target a location by its slug (recommended) | slug="new-york" |
Read the Location Status Badge Guide to see how to add live store status to headers, sidebars, or footers.
4. Store Locator Information
Shortcode: [mulopimfwc_location_info]
Purpose: Makes visible your store’s info such as address, contact details, and maps.
Parameters:
| Parameter | Values | Description | Example |
|---|---|---|---|
id | Numeric IDs | Show specific location(s) by ID | id="123" or id="123,456,789" |
slug | Slug names | Show location(s) by slug | slug="downtown,uptown" |
layout | auto, tabs, compact, grid | Choose display style | layout="tabs" |
search | yes / no | Enable search bar | search="yes" |
compact | yes / no | Compact view for single location | compact="yes" |
limit | Number | Limit number of locations shown | limit="5" |
orderby | name, id, count | Sort locations | orderby="name" |
order | ASC / DESC | Sort order | order="ASC" |
Visit the Store Locator Information Shortcode Guide for layout examples and troubleshooting tips.
5. AJAX Product Filter
Shortcode: [mulopimfwc_product_filter]
Purpose: Allows you to add AJAX-powered product filters by location and stock status.
Parameters:
| Parameter | Values | Description | Example |
|---|---|---|---|
location | yes / no | Show location filter dropdown | location="yes" |
stock | yes / no | Show stock status filter dropdown | stock="yes" |
See the AJAX Product Filter Shortcode Guide to learn how to enable automatic display or place filters manually.
6. Location Recommendations for Products
Shortcode: [mulopimfwc_location_recommendations]
Purpose: Displays product recommendations location‑wise based on popularity and customer insights.
Parameters:
| Parameter | Values | Description | Example |
|---|---|---|---|
limit | Number | How many products to display | limit="8" |
columns | Number | Grid layout columns | columns="4" |
title | Text (supports {location}) | Section title | title="Popular at {location}" |
show_title | yes / no | Show or hide the section title | show_title="yes" |
show_badge | yes / no | Display popularity badge on products | show_badge="yes" |
orderby | popularity | Sort products by popularity | orderby="popularity" |
Explore the Location Recommendations Guide to personalize shopping experiences with trending products per branch.
Quick Summary
Shortcodes in Multi Location Product & Inventory Management for WooCommerce allow you to add dynamic features such as store selectors, product filters, and location details anywhere on your site. Each shortcode comes with parameters for customization, and you can place them in headers, footers, or custom pages using WordPress widgets or Elementor.