1. Home
  2. Docs
  3. Shortcodes
  4. Shortcodes
  5. Categories

Categories

You can display all categories of directorist listings on any page or post using the following shortcode.

Directorist all categories shortcode:[directorist_all_categories]

The [directorist_all_categories] shortcode has many parameters to customize the display of all categories. Let’s have a look at the available parameters and their available values with some description.

Parameters:

  • view: You can display all categories in a list layout or grid layout. Available Options: list | grid view. The default value is grid. Example: [directorist_all_categories view=”grid”].
  • orderby: You can order all categories using this attribute. Available Options : id | count | name | slug. The default is id. Example: [directorist_all_categories orderby =”id”] .
  • order: You can sort all categories in ascending or descending order using this attribute. Available Options: asc | desc. Default is asc. Example: [directorist_all_categories order=”asc”].
  • logged_in_user_only: You can make all categories page only visible for logged in user using this parameter. Options available: yes | no. Example: [directorist_all_categories logged_in_user_only=”no”].
  • redirect_page_url: Forward/redirect all categories page using this parameter. Example: [directorist_all_categories redirect_page_url=”www.aazztech.com”].
  • columns: You can set the number of columns of the grid view layout using this attribute. Example [directorist_all_categories columns=”3″]
  • cat_per_page: You can set the number of categories to show per page using this parameter. Default is 100. Example: [directorist_all_categories cat_per_page=”6″].
  • slug: You can display specific categories using this parameter. Use category slugs separated by a comma. Example: [directorist_all_categories slug=”food”].

Sample Screenshot

The shortcode output on your site may be a little different because new features are being added and modified with every update.

All categories

All categories

Video