When I create a new staff member I fill out all of the fields it asks. However after I submit it and go to the post the image and name are there, but the bio, position, email and phone are nowhere to be found. I dont think it is a css issue. Maybe i’m just not understanding the plugin?
Hey @brynfld –
You’ll need to customize the staff loop template on this page: your-website-here.com/wp-admin/edit.php?post_type=staff-member&page=staff-member-template
But the default staff loop should be showing those fields by default. Do you have a link you can share that shows how your staff members currently look on your site? That will help me see if it’s a problem with CSS or HTML.
I would like to to but unfortunately the site is hosted locally. And I dont have a way to make it public with my current setup.
The loop is currently set to the default.
Im going to paste the html that’s being appended to the page.
<div class="entry-main"> <header class="entry-header"> <div class="entry-thumbnail"><img width="100" height="125" src="http://127.0.0.1/company/wp- content/uploads/2017/10/name_of_employee.jpg" class="attachment-post- thumbnail size-post-thumbnail wp-post-image" alt=""> </div> <h1 class="entry-title">Morley Quatroche, Jr.</h1> </header><!-- .entry-header --> <div class="entry-content"> </div><!-- .entry-content --> <div class="entry-categories">Posted in .</div> </div>
As you can see, the image that does appear is indeed the one that I set as the employee’s image when creating his entry. But the alt text and the class name actually never get appended to the image tag either. Leading me to believe that the creation of the user page is flat out ignoring the loop template. That’s why I don’t think it’s a css issue and I might just be missing some key step to this process. Again sorry I cant post the actual page, I know it would be infinitely more helpful.
- This reply was modified 4 years, 7 months ago by brynfld.
Ah…I think you’re seeing the single staff member page (yoursite.com/staff-members/john-smith). To get that to show the staff loop requires a bit of work right now. I’ve pinned a topic about it here: https://wordpress.org/support/topic/how-to-edit-custom-staff-profile-page/
If you’re having trouble with getting the [simple-staff-list] shortcode to display correctly, then that’s a different issue, but I’m pretty sure you’re talking about a single staff member page.
Basically I wanted the plugin to provide a page with all staff and for each entry to have it’s own page displaying the information there as well. Is that not possible with the plugin?
It is possible, you’ll just need to build out the single-staff-member.php template so it fits in with your theme.
[simple-staff-list] will give you a list of your staff members.
Then for the single staff member pages:
Although it’s several years old, the premise discussed in this reply is still accurate for setting up your single staff member pages: https://wordpress.org/support/topic/link-to-staff-member-page/#post-3532640
This thread also discusses how to get it to work: https://wordpress.org/support/topic/custom-post-template-for-single-staff-member/
The code that retrieves all the custom data about a staff member (name, title, email, etc) is now located on about line 90 of simple-staff-list/public/partials/simple-staff-list-shortcode-display.php so reference that when you’re building out your single-staff-member.php file.
This worked perfectly. Thank you so much for being so attentive to your plugin, I really appreciate the responses.
For reference and for anyone else who winds up here looking for answers.
1. Go to your wordpress installation’s theme directory.
2. Find “single.php” and copy it
3. Paste it into that same directory and rename it “single-staff-member.php”.
4. Open that in your text editor of choice.
5. Remove the default html and php within the “id=content” div element.
6. Create a new set of php tags
7. Within those tags you can customize how you want the page to look. To retrieve the field values you entered for the employee, you can use code like this:
$custom = get_post_custom(); $name = get_the_title(); $name_slug = basename(get_permalink()); $title = $custom["_staff_member_title"]; $email = $custom["_staff_member_email"]; $phone = $custom["_staff_member_phone"]; $bio = $custom["_staff_member_bio"];
8. With those values you can customize your single user page template like this:
echo "<h2>$name</h2> <br/> <h4>$title</h4>";
Awesome. Glad you got everything working! 👍
Image sizes: The plugin looks great, but it is outputting the large image size. We already have a thumbnail size, but I can’t see how to choose to use it, or as a code option in the template?
Hi @blitz999 –
You can change the image size by passing the
image_sizeattribute in the shortcode. So, for example, if you wanted to use
thumbnailsize, you would do this:
No worries, but in the future you should create a new support thread for a new issue. 👍
Thanks for the reply. I tried that, but it showing a blank page where the content should be.
I was unaware I was adding to an existing thread, this has happened before and is a quirk of the WordPress forum design.
Hmm. I’ve just double checked the latest version of the plugin on the latest version of WP to confirm that this is working as expected.
Your issue may be specific to your hosting environment, or a conflict with your theme or another plugin.
Are you able to check your error logs, or turn on WP_DEBUG in wp-config.php to give me more information about what’s causing your site to break when you try using a different image size?
- The topic ‘Is the bio, position or anything else supposed to show up in the person’s post’ is closed to new replies.