Business Category Pages
Display list of Business Categories
To display a list of business categories on your site, create a page and insert the following shortcode:
The [business_category] shortcode defaults to a single column, list view.
Pro Tip: The formatting for your category pages is determined by your theme. To update formatting for your category pages, you will need to edit the category template in your theme.
Responsive Grid Display
To create the Search by Category Grid Display shown below, first create both parent and child categories for your Business Directory.
Then add the format=”grid” parameter to your shortcode. This will take create a responsive layout using both parent and child categories that will be similar to our demo site in structure, and will use the formatting from your active theme.
Category Shortcode Parameters
This category shortcode also includes the following additional parameters:
Change the order in which the categories are listed.
- name (default)
- count (number of businesses in the category)
You can use this to determine whether categories are listed in ascending or descending order.
- ASC (lowest to highest)
- DESC (highest to lowest)
[business_categories orderby="count" order="ASC"]
Show the number of businesses in each category
- 0 – (default – the number will not display)
- 1 – number of businesses displayed
Display categories and sub-categories in a nested list
- 0 (all categories and subcategories will be in one alphabetized list)
- 1 (default – subcategories will be nested under their parent categories)
Display empty categories, or only categories that actually have businesses in them
- 0 – empty categories will be displayed
- 1 – (default – empty categories will not display)
Display only categories that are a child of a given category. Use the ID number of the category whose children you want to display.
Exclude a certain category. Use the ID number of the category you want to exclude.
Please Note: These parameters affect the page displaying your list of categories only. When you click on a category, your theme determines the layout of the category page that is displayed. In order to update this, you will first need to create a category page template.
For more control over how your directory is displayed, try the [business_directory] shortcode with the category parameter.
Category pages not linking to Business Directory individual listing pages?
If your category pages are not showing up, try setting your permalinks to ‘Post name’ instead of the WordPress default.
- Go to Settings >> Permalinks.
- Under ‘Common Settings’, choose Post.
- Be sure to save your changes.
Category page layout doesn’t look like Directory pages
WordPress category pages are displayed using a template from your theme. The theme’s author may have created a specific category page template such as category-id.php, or category.php. But if they have not, the theme’s archive.php or index.php page may be used.
A simple way to solve this is to use a Chamber Dashboard theme. Our themes have been designed specifically for use with our plugins and to give all of the pages on your site a polished, professional look.
You could also create your own category page template.