Usage:
[jobs_categories full_width="yes" hide_empty="0" type="group_by_parents" number="999"]
Options:
- title– Optional title of section, used if type is set to “all”
- orderby – id, count, name (Default), slug, none
- number – The maximum number of categories to return.
- hide_empty false | true – if set to true, will hide categories that don’t have any jobs assigned
- type – group_by_parent / all / parent
- parent_id ID of category to display if type is set to “parent”
What’s the difference between each “TYPE”
type=”all” – If shortcode is set to type “all” it will display all categories, you need to also add attribute “title“. If you’ll look at the screenshot above, the “Design, Art & Multimedia” will be a title, while green list of links will be list of all job categories
type=”only_parents” – If shortcode is set to type “only_parents” it will display only top level categories, without the child categories. you need to also add attribute “title”. If you’ll look at the screenshot above, the “Design, Art & Multimedia” will be a title, while green list of links will be list of all job categories
type=”group_by_parent“ – If shortcode is set to type “group_by_parent” it will display all categories that have children. If you’ll look at the screenshot above, the “Design, Art & Multimedia” will be a parent category, while green list next to it will be list of all child categories of “Design, Art & Multimedia”. This will loop through all categories and show only the top level categories with children
type=”parent” – If shortcode is set to type “parent” it also needs attribute “parent_id” with ID of category to display. It will display only child categories of this category you’ve passed the ID of.