Getting Started with Simple Staff List Single Staff Member Templates

So this has probably been the most requested feature since I released Simple Staff List several years ago – single Staff Member templates. With Simple Staff List 2.1.0 you’ll be able to customize what’s shown on a single Staff Member page.

All of the default template files are located in simple-staff-list/public/templates. To override a file, copy the template file you want to change into a directory within your theme or child theme named sslp-templates keeping the same file structure.

If this style of templating sounds familiar to you, it should. I’ve taken the same approach that WooCommerce does to templating.

For example: If you want to override the staff bio section, copy wp-content/plugins/simple-staff-list/public/templates/single-staff-member/staff-bio.php to wp-content/themes/yourtheme/sslp-templates/single-staff-member/staff-bio.php. The file in your theme will now override the default Simple Staff List file.

There’s also built-in support for the TwentySeventeen and TwentySixteen default WordPress themes. So if you’re using one of those themes, you’ll only have to override the templates if you want to change the layout.

Summary

I hope this gives you a quick overview of the new templating features in the latest version of Simple Staff List. Please don’t hesitate to open a support ticket if you have questions or run into any issues. For a more in-depth look at how this feature works, keep reading below.

Template Files

Each default Staff Member field has its own template file (Image, Name, Position, Email, Phone, Facebook, Twitter, Bio) so you can customize each piece of the single Staff Member template. There are also template files for the HTML markup that wraps the single Staff Member content, and the content area of the single Staff Member page. Here’s the full list:

  • templates/content-staff-member.php
  • templates/single-staff-member.php
  • templates/global/wrapper-end.php
  • tempaltes/global/wrapper-start.php
  • templates/single-staff-member/staff-bio.php
  • templates/single-staff-member/staff-email.php
  • templates/single-staff-member/staff-facebook.php
  • templates/single-staff-member/staff-image.php
  • templates/single-staff-member/staff-meta.php
  • templates/single-staff-member/staff-name.php
  • templates/single-staff-member/staff-phone.php
  • templates/single-staff-member/staff-position.php
  • templates/single-staff-member/staff-twitter.php

Template Hooks

sslp_before_single_staff_member
Before any other content on the single Staff Member page. This is where the wrapper-start.php  template file is hooked in. 

sslp_before_single_staff_member_header
Before header on the single Staff Member page. The header contains the staff image, name, and meta information.

sslp_single_staff_member_header
The header content for the single Staff Member. By default this includes the staff image, name, and meta information.

sslp_after_single_staff_member_header
After the header content.

sslp_single_staff_member_content
Inside the “Staff Content” area. This is where the staff bio is hooked in.

sslp_after_single_staff_member_content
After the “Staff Content” area.

sslp_single_staff_member_meta
This is the “Staff Meta” area. By default, the staff position, email, phone, facebook, and twitter fields are hooked in here.

sslp_after_single_staff_member
After all other content on the single Staff Member page. This is where the wrapper-end.php  template file is hooked in.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Brett Shumaker

Subscribe now to keep reading and get access to the full archive.

Continue reading