• Hey Brett. Thanks for the great plugin. I’ve never needed a feature like this before on a client’s site, but, when I finally did, you, your plugin, and the team at WP Beginner made it a great experience.

    Question- is it possible for me to add a field of my own. I’ve created a single-staff-member.php file and would like to ad a space under the photo where I can display a graphic that shows a staff member’s awards/recognitions.

    Appreciate any advice you can offer. Thanks, Tom

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brett Shumaker

    (@brettshumaker)

    Hi @ttrusty

    I’m glad you’ve enjoyed the plugin so far!

    Right now, while it’s possible to add custom tags, it’s not as easy as I’d like it to be. That feature is on my list of things that I want to add to the plugin but I’ve not had much spare time over the past year or so to work on it.

    I would add an additional field by writing a small custom plugin to add an additional metabox to the Staff Member edit screen in wp-admin. Using the add_meta_box() function, add a metabox to the staff-member post type to hold your new field (remember to save the data). Then, take a look at /public/partials/simple-staff-list-shortcode-display.php to get a feel for how the field data is used. On lines 25-26, you can see that the default tags are stored in options. Decide what tag ([website], etc) you want to use for your custom field, and add it to one of those options. Then, on lines 138 and 141, there are filters for adding in replacement values for your new custom field – note that the order of the tags in the option must match the order of the replacement values.

    Then you can also use your new field on your single-staff-member.php template file.

    Hope that helps! Let me know if you have any other questions.

    Thread Starter ttrusty

    (@ttrusty)

    Thanks for the amazingly quick response Brett. I’ll be sure to give you a high rating.

    And thanks also for the detailed explanation. I’ll need to do a little research before moving forward on this. Not sure, but it might be a little over my head. I’ll let know what happens.

    Take care, Tom

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is there a way to add a field to single-staff-member.php’ is closed to new replies.