Skip to main content

Staff Gallery

The `[staff_gallery]` shortcode displays staff members from a Staff Directory as a photo gallery — a grid of staff photos with names as captions.

Updated today

Staff Gallery

The [staff_gallery] shortcode displays staff members from a Staff Directory as a photo gallery — a grid of staff photos with names as captions.

Requires SportsPress Pro with a Club, League, or Agency license. The Staff Directories module must be enabled.

What It Displays

A responsive grid of staff thumbnail photos with staff member names below each image. Clicking a photo links to the staff member's profile page when link_posts is enabled.

When to Use It

Use on any page. Supply id pointing to a SportsPress Staff Directory post. Inside the Loop on a Staff Directory post page, id can be omitted.

Parameters

Parameter

Type

Default

Description

id

integer

get_the_ID()

Post ID of the Staff Directory. Required outside the Loop.

title

string/boolean

false

Override the displayed heading.

number

integer

-1

Maximum number of staff to display. -1 shows all.

columns

integer

3

Number of columns in the photo grid.

size

string

'sportspress-crop-medium'

WordPress image size for thumbnails.

itemtag

string

'dl'

HTML tag wrapping each gallery item.

icontag

string

'dt'

HTML tag wrapping the image within each item.

captiontag

string

'dd'

HTML tag wrapping the caption within each item.

grouptag

string

'h4'

HTML heading tag for group headings (if grouping is used).

show_all_staff_link

boolean

false

1 to show a "View all staff" link below the gallery (requires id).

link_posts

boolean

From settings

1 to link staff photos to staff profile pages. Default from the Link staff setting.

Usage Examples

Minimal — photo gallery for a staff directory:

[staff_gallery id="60"]

4-column gallery with staff profile links:

[staff_gallery id="60" columns="4" link_posts="1"]

Gallery with a "View all staff" link:

[staff_gallery id="60" show_all_staff_link="1"]

Did this answer your question?