Single Coach Profile and Coaches Gallery Pages

These pages have proven to be the hardest for plugin users to get working properly. Careful attention to this page, the plugin’s Installation page, and the WordPress Support Forums should help you out (a lot).

For those who are more knowledgeable in some technical details of WordPress, “coach” is simply a custom post type, and `single-coach.php` is just the template for displaying a single post of “coach” type following the WordPress Template hierarchy. “Staffs” is a custom taxonomy (non-hierarchical, so think “tag”, not “category”) and the `taxonomy-staffs.php` template displays all the (custom coach) posts in a specific “staff”, again following the standard WordPress Template hierarchy. This is (arguably) the “proper” way to do provide this functionality within the WordPress framework, and it does simplify automate a lot of things internally, but it can be very confusing, especially for less experienced and/or less technical users. At this point, it is what it is, so this page tries to help.

Single Coach Profile Page

Single Coach Profile

The single coach profile pages can be linked from the coach’s names and photos in staff roster tables as well as the coach’s names and photos in the coachs galleries. NOTE that those links are NOT active by default, because they will not work ‘out of the box’ (keep reading). If you wish to use the single coach profiles, you must also copy both the single-coach.php template from the plugin’s /theme-templates directory to your theme’s main directory. The links in the coaching staff table are of the form:

your-base-url/coaches/coach-slug/

The first problem many users encounter is a 404 Page not found message, which normally indicates that their permalinks need to be reset. On the WP admin dashboard go to Settings -> Permalinks. Change the setting to anything at all. Save it. Then change to setting back to “Post name” and save it again.

The next problem is that the single coach page doesn’t look right in a given theme. The single-coach .php template was built and tested on the WP Twenty Eleven theme, but there’s no reason it will “fit” your theme. Some of the settings available in the plugin’s display settings page may help (like photo size), but you will likely need to edit the styles in mstw-cs-styles.css and/or the template to get the single coach profile to fit nicely within your theme’s ‘wrapper’.

This is just life in the world of WordPress. It can be done and I’ve helped a number of users do it in a variety of themes. Send me an e-mail (mark@shoalsummitsolutions.com) and I’ll try to help you out (especially if you buy me some coffee!).

Coaches Gallery Page

Coaches Gallery

The coaches gallery page(s) must be linked from somewhere on your site, for example, a menu item. You cannot insert into a page via a [shortcode]. If you wish to use the coaches gallery view, you must copy the taxonomy-staffs.php template from the plugins `/theme-templates` directory to your theme’s main directory. The URL for a team gallery page looks something like:

your-base-url/staffs/staff-slug

The first problem many users encounter is a 404 message, which indicates that their permalinks need to be reset. See the instructions above. The next problem is that the coaches gallery page doesn’t look right in a given theme. See the discussion above.

Coaches’ Photos

Individual coach’s photos are entered as the Featured Image (aka “Thumbnail”) on the Add/Edit Coach screen. The default size is 150x150px, which works pretty well ‘out of the box’ with the current single coach and coaches gallery templates in the WordPress Twenty Eleven Theme. It is quite possible that other themes will require you to adjust the image size. NOTE that if you choose to change the image size on the Display Settings admin screen, you MUST upload images with the new size (or at least with the same aspect ratio) or you WILL see some distortion. Also, you will probably need to modify the single coach profile and coaches gallery templates and/or styles (in `css/mstw-cs-styles.css)` in order to get the your images to fit properly in the space provided by your theme.

No featured image is found, the single coach profile page and the coaches gallery page will look for the file `default-photo-staff-slug.jpg` in the plugin’s `/images` directory. So you can set a different default images (usually the team’s logo) for each staff. If that file is not found, the single coach profile page and the coaches gallery page will use the `default-photo.jpg` image from the plugin’s `/images` directory. Out of the box, the default is a “mystery man”. Use an FTP program to replace it with another image of your choosing, your team logo, say. Your replacement `default-photo.jpg` file **MUST** use that name and should be 150x150px by default (or whatever size you have selected).