Skip to main content

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.

Updated today

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.

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

id

(required)

Directory post ID — required unless the shortcode is inside The Loop

number

-1

Number of staff to display; -1 shows all

columns

3

Number of thumbnails per row

itemtag

dl

HTML wrapper element for each gallery item

icontag

dt

HTML element wrapping the image

captiontag

dd

HTML element wrapping the caption

size

thumbnail

Image size; accepts WordPress built-in sizes (thumbnail, medium, large) and custom registered sizes (e.g. sportspress-fit-icon)

link_posts

1

Set to 1 to hyperlink each thumbnail to the staff member's profile page

show_all_staff_link

0

Set to 1 to show a "View all staff" link below the gallery

Example

[staff_gallery id="99" number="15" columns="5" size="sportspress-fit-icon" show_all_staff_link="1"]

Did this answer your question?