Customizing Your WordPress Site with TapGoods Shortcodes
TapGoods shortcodes let you quickly add inventory and user-interaction features to your WordPress site. Shortcodes are small snippets of code that you can insert into pages and posts to display dynamic content, such as inventory items, location selectors, and sign-in/up links.
In this article, we will define shortcodes and modifiers, then outline each available shortcode and how to use it with its available modifiers.
- What are Shortcodes and Modifiers?
- Where to Find Shortcodes in WordPress
- Adding Inventory to WordPress Pages
- Adding a Cart Button to WordPress Pages
- Adding Location Dropdowns to WordPress Pages
- Adding Sign In Links to WordPress Pages
- Adding Sign Up Links to WordPress Pages
- Tips for Using Shortcodes and Modifiers
What are Shortcodes and Modifiers?
Defining Shortcodes
Shortcodes in WordPress are small pieces of code enclosed in square brackets ([]) that allow you to add dynamic content to your site without writing complex code. When added to pages, posts, or widgets, these shortcodes are automatically replaced with specific functionality or content rendered by WordPress or plugins like TapGoods.
Defining Modifiers
Modifiers are additional parameters you can add to shortcodes to customize their functionality or the content they display. These parameters are written inside the shortcode brackets, often in a key="value" format, allowing for detailed control over the shortcode’s behavior.
When using TapGoods shortcodes, modifiers allow you to tailor how inventory items are displayed, control user interaction elements, and manage content visibility based on user needs or site design. Here’s how modifiers can be applied to a typical TapGoods shortcode:
Example:
[tapgoods-inventory tags="Outdoor" show_pricing="false"]
- tags="Outdoor" – This modifier only filters the inventory to show items named "Outdoor."
- show_pricing="false" – This modifier hides the pricing information for the listed items.
Applying Modifiers with TapGoods Shortcodes
When using TapGoods shortcodes, modifiers allow you to tailor how inventory items are displayed, control user interaction elements, and manage content visibility based on user needs or site design. Here’s how modifiers can be applied to a typical TapGoods shortcode:
Example:
[tapgoods-inventory category ="Chairs" show_pricing="false"]
- category ="Chairs " – This modifier only filters the inventory to show items in the “Chairs” category.
- show_pricing="false" – This modifier hides the pricing information for the listed items.
Where are TapGoods Shortcodes Located?
Here is a list of the available shortcodes and how to use them with the available modifiers. Shortcodes are located underneath the TapGoods Plugin in WordPress.
Show Inventory
Shortcode: [tapgoods-inventory]
Purpose: Adds inventory listings to any page on your site. You can use this on your main shop page or any other page where you want to showcase your products.
Modifiers:
-
Filter by Category: Add category="Category" to display items from a specific category in TapGoods.
- Example: [tapgoods-inventory category="Furniture_Collection, Chairs, Tents" show_filters="false"]
-
💡Tips:
- Categories are case-sensitive.
- Use commas to separate multiple categories.
- For categories with two words, replace spaces with an underscore (_)
- For categories with “&”, replace with two underscores (__)..
-
Filter by Subcategory: Add tags="Subcategory" to display items from a specific subcategory in TapGoods.
- Example: [tapgoods-inventory tags="cross back, Chiavari, barstools" show_filters="false"]
-
💡Tips:
- Subcategories are not case-sensitive. For example, [tapgoods-inventory tags="cross back"] and [tapgoods-inventory tags="Cross Back"] will produce the same results.
- You can filter by multiple subcategories. Use commas to separate them.
- For subcategories with two words, use a space between words.
-
⚠️Notes:
-
The WordPress plugin supports categories with one level of subcategories.
- Supported structure: Parent Category → Subcategory
- Not supported: Parent Category → Subcategory → Sub-subcategory
-
The WordPress plugin supports categories with one level of subcategories.
- Hide Inventory Filters: Add show_filters="false" to hide filtering options.
- Hide Item Pricing: Add show_pricing="false" if you wish to hide pricing information.
Special Considerations for the Inventory Shortcode:
Select Location
Shortcode: [tapgoods-location-select]
Purpose: Inserts a dropdown menu for users to select a location. This is useful if your inventory varies by location or if you offer location-specific services. This Shortcode is Multilocation Business specific. If you only have one location, this will not be useful for your site.
Cart Button
Shortcode: [tapgoods-cart]
Purpose: Adds a cart icon to your navigation bar, allowing users to navigate to the Cart page.
Sign In Link
Shortcode: [tapgoods-sign-in]
Purpose: Adds a sign-in link to the Customer Portal. The sign-in link will take them from WordPress to the TapGoods sign-in page, allowing customers to view their carts' contents, submit their orders, and review their order history.
Sign Up Link
- Shortcode: [tapgoods-sign-up]
- Purpose: Similar to the sign-in link, this adds a sign-up link to your navigation, encouraging new users to register on your site.
Tips for Using Shortcodes
- Placement: You can place shortcodes in any post, page, or widget area that accepts shortcodes.
- Customization: Consider styling these elements with CSS to match your site’s design. Your WordPress theme might already apply styles to these, but you can make additional tweaks with custom CSS.
- Testing: Always preview changes to ensure that shortcodes display correctly and function as intended before going live.
Need Help?
If you're unsure how to integrate these shortcodes or require more advanced customization, consider discussing them with your WordPress developer.
They can provide valuable insights and help implement these features to meet your specific needs.