In my tutorial requests Trello board, a user asked:
I would love a tutorial on how to use cpt and maybe the accordian show/hide to get a result similar to this Team/Staff page: http://www.unified.com/team/ I think this could be used for portfolio pages also. Thank you so much!
I think this could be used for portfolios and other uses as well. Thank you!
In this article, we are going to set up a Team CPT archive page displaying a grid of team members' photos. Hovering on a team member's photo will display name and job title (a custom field) of the person on a random background color overlay. Clicking on the photo will slide down an info panel showing more info about that person incl. social icons (if their URLs have been entered in the back end).
We shall use CSS filter to make the photos black and white in regular state and in color when the info panel is open for a member.
Team CPT archive:
When a photo is hovered:
After a photo is clicked:
Install and activate Pods.
Create a Team Member CPT with support for Featured image and enable archive page. Under Advanced Options specify
team for Archive Page Slug Override.
Add these custom fields: Job Title, Twitter, Facebook and Linkedin.
You might want to make the Job Title mandatory.
Add the following in child theme's functions.php:
Add team members. Remember to upload/select featured images (250px x 250px is the ideal size) and fill in the custom fields.
Regenerate thumbnails, if necessary.
Create a file named say, team.js in the child theme's
js directory having this code:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.