1. Home
  2. Docs
  3. Listing Management
  4. Category


Adding a listing category

At first, you need to create a listing category before assigning a listing to it. You can create a listing category in two ways: 1. From Directorist Listings >  Add New Listing page while adding a listing, 2. From Directorist Listings > Directorist Categories page. The main difference between these two places regarding adding a category is that you will be able to add an icon and an image to any listing category in the Directorist Category page while you can not do the same in the Add New Listing page. This is why we recommend creating all listing categories from the Directorist Categories Page.

Go to Directorist Listings > Directorist Categories page and give a name to your chosen category. Adding a slug is optional as WordPress will generate this from the name field automatically. Choose a parent category if you want to organize by a parent-child hierarchy. The description field is optional. From the Category Icon dropdown, select an icon for the category. You can also search for an icon. Directorist uses Font Awesome icons. So, you can search a category icon by Font Awesome icon names. If you wish, you may add an image to the category by clicking the ‘Add Image’ button on that page. The category image will be visible only on the page with the shortcode [directorist_all_categories] and Grid view layout ( you may also display categories in a list layout. Keep reading for more info on this later in the page). Once you have created the number of categories you wanted, you can assign them to any listing during adding a listing either from the front-end or the backend dashboard.

Displaying all listing categories

You can display all listings categories using the shortcode [directorist_all_categories]. Use this shortcode inside any page content to display all categories in a single place.

Displaying categories in a sidebar

You can display all listings categories using the Directorist – Categories Widget. You can use this widget from Appearance > Widgets page. Drag the Directorist – Categories widget to a sidebar eg. the Directorist – Listing Right Sidebar and customize the widget settings. Click save after customizing the widget and visit any listing details page. You will see categories are being displayed perfectly. Check out the screenshots below for more understanding.