Title: Addition to basic shortcodes
Last modified: August 30, 2016

---

# Addition to basic shortcodes

 *  [captinfonz](https://wordpress.org/support/users/captinfonz/)
 * (@captinfonz)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/addition-to-basic-shortcodes/)
 * Great plugin – would you be able to add a basic shortcode in the staff-directory
   loop that allows us to pull out either the full link to that staff members page,
   or their id so that we can link it manually?
 * i added/changed the following in classes/staff_director_shortcode.php in the 
   plugin director and it fixes my requirement, but may be a nice simple addition
   to future releases. changes done around lines 290
 *     ```
       $staff_id = get_the_ID();
       $accepted_single_tags = array("[name]", "[photo_url]", "[bio]", "[category]", "[staff_id]");
       $replace_single_values = array($staff_name, $photo_url, $staff_bio, $staff_category, $staff_id);
   
       $accepted_formatted_tags = array("[name_header]", "[photo]", "[email_link]", "[bio_paragraph]", "[website_link]", "[staff_id]");
       $replace_formatted_values = array("<h3>$staff_name</h3>", $photo_tag, $staff_email_link, "<p>$staff_bio</p>", $staff_website_link, $staff_id);
       ```
   
 * [https://wordpress.org/plugins/staff-directory/](https://wordpress.org/plugins/staff-directory/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [adamtootle](https://wordpress.org/support/users/adamtootle/)
 * (@adamtootle)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/addition-to-basic-shortcodes/#post-6185328)
 * Adding a staff member link is something on my to-do list, but I don’t have any
   official plans for it yet. Someone else has requested support for this as well
   as a single staff member template. I’m going to try to hack something together
   in the coming days, but I’ve got a little more research to do before I can promise
   anything.
 *  [ckone](https://wordpress.org/support/users/ckone/)
 * (@ckone)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/addition-to-basic-shortcodes/#post-6185389)
 * Adding to this thread.
 * I had a specific need for slugs. And I hope I am using “slugs” the right way–
   I am somewhat new to WordPress.
 * I needed “john-smith” from this plug-in. So, I used
 * > $staff_slug = basename(get_permalink());
 *  insert this right under $staff_name (it really does not matter but for easy 
   to find purpose).
 * And then, followed “accepted_single_tags” and “replace_single_values” so that
   I can use this as [name_slug].
 * I can then use john-smith from Staff title, and also use it as anchor.
 * > a href=”my_url/#[name_slug]”>[name]</a
 * and so on…and so on…
 * I suppose I am okay how it functions until adamtootle introduces on the future
   release, like [permalink] and [name_slug].
 * PS the original need for slugs was to use them as anchor. This attempt was to
   satisfy my frustration on a website that someone else designed, and the current
   owner wanted that way 🙂
 *  [duce](https://wordpress.org/support/users/duce/)
 * (@duce)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/addition-to-basic-shortcodes/#post-6185392)
 * Also would like to know if this might happen. From all the various plugins I 
   have tried this one is the most basic yet near perfect I imagined such a plugin
   should be. Thanks Adam, great job!
 * I would also like the profile link to be “web_url”/category/name.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Addition to basic shortcodes’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/staff-directory_a19d9e.svg)
 * [Staff Directory](https://wordpress.org/plugins/staff-directory/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/staff-directory/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/staff-directory/)
 * [Active Topics](https://wordpress.org/support/plugin/staff-directory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/staff-directory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/staff-directory/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [duce](https://wordpress.org/support/users/duce/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/addition-to-basic-shortcodes/#post-6185392)
 * Status: not resolved