Departments

Departments in CP Staff use a hierarchical WordPress taxonomy to organize staff members into groups. Departments control how staff are grouped on the archive page and can be used to filter staff in shortcodes.

Creating Departments

  1. Navigate to Staff > Departments
  2. Enter the department name (e.g., “Pastoral Staff”)
  3. The Slug is generated automatically from the name
  4. Optionally add a Description
  5. To create a child department, select a Parent from the dropdown
  6. Click Add New Department

You can also create departments inline while editing a staff member by clicking + Add New Department in the Department sidebar box.

Hierarchical Departments

Departments support parent-child relationships, enabling nested organizational structures:

Pastoral Staff
├── Senior Leadership
└── Associate Pastors
Worship Team
├── Worship Leaders
└── Production

The archive page respects this hierarchy, displaying parent departments first with child departments nested beneath. Each level uses appropriate heading levels (h3, h4, etc.) for proper document structure.

Department Ordering

By default, departments display in alphabetical order. To customize the order:

  • Install the WP Term Order plugin for drag-and-drop department ordering
  • Use the cp_staff_departments_args filter for programmatic control
// Order departments by term order (requires WP Term Order plugin)
add_filter( 'cp_staff_departments_args', function( $args, $parent_id, $depth ) {
    $args['orderby'] = 'term_order';
    return $args;
}, 10, 3 );

Using Departments in Shortcodes

Filter staff listings by department using the [cp_staff_list] shortcode:

[cp_staff_list cp_department="pastoral-staff"]
[cp_staff_list cp_department="worship,kids"]
[cp_staff_list exclude_cp_department="support-staff"]

See Shortcodes for full shortcode documentation.

Department Labels

Customize the “Department” label using filters:

add_filter( 'cp_department_single_label', function( $label ) {
    return 'Ministry';
});

add_filter( 'cp_department_plural_label', function( $label ) {
    return 'Ministries';
});

For more developer customization options, see the Developer Guide.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support
Scroll to Top