Directory Gallery Layout
The Gallery format displays staff members as a photo grid with name captions. Select Gallery in the Layout meta box when editing a Staff Directory.
This feature is part of SportsPress Pro.
How It Works
Each staff member's featured image (their Photo) is displayed as a thumbnail. Below each thumbnail the staff member's name appears as a caption. Staff without a photo show no image in the grid cell.
[staff_gallery] Shortcode
The gallery format is embedded using the [staff_gallery] shortcode. Copy the ready-made code from the Shortcode sidebar panel on the directory edit screen, or write it manually.
Basic Usage
[staff_gallery id="99"]
Parameters
Parameter | Default | Description |
| (required) | Directory post ID — required unless the shortcode is inside The Loop |
|
| Number of staff to display; |
|
| Number of thumbnails per row |
|
| HTML wrapper element for each gallery item |
|
| HTML element wrapping the image |
|
| HTML element wrapping the caption |
|
| Image size; accepts WordPress built-in sizes ( |
|
| Set to |
|
| Set to |
Example
[staff_gallery id="99" number="15" columns="5" size="sportspress-fit-icon" show_all_staff_link="1"]
