Documentation Kenii Essentials Reference
Essentials shortcodes
Every shortcode Kenii Essentials provides, with its attributes and defaults
Essentials shortcodes
Four shortcodes put people and positions on your public pages. They work in any
editor: the block editor, a classic editor, or a page builder.
Everything they show comes from People and Roles in the Kenii admin, so a title
or phone number is corrected in one place and every page that names that person
updates with it.
[kenii_staff_directory]
A searchable directory of everyone marked Show in the public directory.
People without that setting never appear, whatever else you pass.
[kenii_staff_directory]
[kenii_staff_directory grouped_by="section"]
[kenii_staff_directory section="leadership" show_search="no"]
[kenii_staff_directory style="cards" columns="name,title,email"]
| Attribute | Default | What it does |
|---|---|---|
section |
empty | Show only one section. Accepts the section’s slug or its numeric id. |
department |
empty | Show only one department. Accepts a slug or an id. |
grouped_by |
empty | section or department. Splits the list into headed groups. Empty means one flat list. |
style |
table |
table or cards. |
columns |
name,title,phone,credentials |
Any of name, title, department, section, office, phone, email, credentials, in the order you list them. Table style only. |
show_search |
see below | yes or no. |
heading |
h3 |
h2, h3 or h4 for the group headings. Pick the one that fits the page’s heading order. |
Search appears by default when the list is grouped or unfiltered, and is
hidden by default when you have narrowed to a single section, because a short
list does not need it. Set show_search to override.
Search matches name, job title, email, office, credentials and phone, including
the phone with its punctuation removed, so 252 and (252) both work.
Sorting
The order is decided for you and is the same everywhere:
- Pinned people first, by their pinned position.
- Then everyone else alphabetically by last name, then first name.
Pin someone in the person editor. Pinning is how a president or a dean stays at
the top of a list that is otherwise alphabetical.
Groups follow the order set on the section or department itself, in
Essentials → Departments. Anything without an order falls in alphabetically
after the ones that have one.
[kenii_person]
One person, as a card. Use it where a page names somebody, so their title and
contact details stay right when they change.
[kenii_person slug="jane-doe"]
[kenii_person email="jdoe@example.edu"]
[kenii_person id="1642"]
| Attribute | What it does |
|---|---|
slug |
The person’s slug. The most stable choice. |
email |
Look them up by email address. |
id |
Look them up by numeric id. |
Renders nothing at all if the person is not found, or if they are not in the
public directory. It never prints an error onto a live page.
[kenii_role]
One position, as a card: the position’s name, who currently holds it, and how to
reach it.
A role is worth using anywhere a page says “contact the Title IX Coordinator”,
because the page then keeps working when the coordinator changes. You update the
holder once in Essentials → Roles.
[kenii_role slug="title-ix-coordinator"]
[kenii_role slug="registrar" show_name="no"]
| Attribute | Default | What it does |
|---|---|---|
slug |
The role’s slug. | |
id |
The role’s numeric id. | |
show_name |
yes |
no hides the holder’s name and shows only the position and its contact details. |
Which contact details show. A role can have its own phone and email, which is
usually right for an institutional line that stays put as people come and go. If
you leave either blank, the role falls back to the holder’s, but only when that
person is in the public directory. Someone kept out of the directory never has
their details published through a role.
A role with nobody in it renders normally, showing the position and any contact
details of its own.
[kenii_roles]
Several positions as a table: Position, Name, Phone, Email.
[kenii_roles]
[kenii_roles slugs="registrar,financial-aid-director" heading="Who to contact"]
| Attribute | Default | What it does |
|---|---|---|
slugs |
empty | A comma-separated list of role slugs, shown in the order you list them. Empty means every role. |
heading |
empty | A heading printed above the table. |
Using your own styles
Every shortcode can render with your theme’s classes instead of Kenii’s, so a
directory looks like the rest of your site rather than like a plugin.
| Attribute | Applies to |
|---|---|
wrap_class |
the element around a table |
table_class |
the table |
row_class |
each table row |
grid_class |
the container around cards |
card_class |
each card |
[kenii_staff_directory table_class="data-table" wrap_class="table-scroll"]
Your classes are added alongside Kenii’s, never instead of them, so you can
override what you want and inherit the rest.
Accessibility and small screens
Below roughly 600px the table becomes stacked rows with each value labeled by
its column name. This responds to the width of the column the directory sits in
rather than the width of the browser, so it behaves correctly inside a narrow
page layout on a wide screen.
Names link to email and phone numbers link to dial. The search box reports its
result count to screen readers as you type.