Plugin version: 1.1.2
PHP version: 5.2.17
Plugin can’t be activated as it produces a fatal error:
Parse error: syntax error, unexpected T_STATIC, expecting T_STRING or T_VARIABLE or ‘$’ in /***/local/home/***/***/wp-content/plugins/staff-directory/classes/staff-directory-settings.php on line 7
]]>Plugin version: 1.1.2
WordPress version: 4.7.5
I created a custom detail field with the template shortcode [order] in order to sort the items by the given number in this field. But the items are ordered by their ID in ascending (or order=DESC => descending) order, the plugin seems to ignore orderby=name.
Full shortcode: [staff-directory cat=3 template=custom_1 orderby=order order=ASC]
(This is a copy of the GitHub issue at https://github.com/adamtootle/staff-directory/issues/23)
]]>First of all thank you for this great plugin! : )
I am massively using the Shortcodes of the Plugins on diferrent pages.
When I updated my System and Plugin, I ran into a problem with the staff-directory
-Shortcode and all the sub-Shortcodes as bio_shortcode
, photo_url_shortcode
.
The Shortcodes did not show the content/post-data of the page given by the ID-Param anymore, but of the page the Shortcode was embedded (i.e bio/the content, featured image and so on).
This is due to the Usage of native Content-Accessing-Functions like get_the_content
in the bio
-shortcode function which refers to the currently set-up post-data.
So I had to add setup_postdata/the_post directly after the custom wp_query in plugins/staff-directory/classes/staff-directory-shortcode.php
to “enable” the native “content-accessing-functions”:
Approximately line 223:
//Store in class scope so we can access query from staff_loop shortcode
Staff_Directory_Shortcode::$staff_query = new WP_Query( $query_args );
$output = '';
if ( Staff_Directory_Shortcode::$staff_query->have_posts() ) {
Staff_Directory_Shortcode::$staff_query->the_post(); // !!!!!!!!!!!!!!!
$output = self::retrieve_template_html($params['template']);
}
wp_reset_postdata(); // !!
wp_reset_query();
…and to finish what we’ve started: after the wp_query-processing there is actually no need to reset the query with wp_reset_query()
. We just need to set the post data back up with wp_reset_postdata()
.
I hope this might help others who ran into this a little annoying issue like me. : )
]]>Hi, i have a simple question. I’m searching for a plugin to do something like this: https://www.florenceperiogroup.com/soci.php
The user should be able to coose a Region of Italy and then a province from that region to find out the members in that region and in that province.
Is this possible with your plugin?
Thanks!
]]>In the Staff Directory > Settings, there is a line stating:
Custom templates can be created by adding a php file to your theme directory with the prefix 'staff_single_'.
After much travail, I found that the prefix should be 'single-staff-*'
Hello, Although I do not have any “fields” for [phone_number] and [website] in my template/settings the tags are showing on the page (https://ideas-global.org/board/) as [phone_number] [website].
How do I remove those from the page display”list” template using the default?
Thank you in advance,
Rob
Hello,
I have used this plugin for our staff page. I need to export and import to other wordpress for all staff with configure and pictures.
Is it possible or not?
]]>Would love to check out a demo with content in it… Thanks.
]]>I’d like to use the full sized version of the image I upload in the featured image slot, but this plugin is using my Thumbnail settings, which I’m using for another format (so changing that is not an option).
Is there any way to change it in the code or something that I will be able to present the full sized image rather than the thumbnail one?
Thanks in advance.
]]>Hi there,
I use custom template 1 and want to show in one row some special categories and in a second row some other categories. It would be fine if I could use [category cat=1,2,3] in row one and in the second row [category cat=4,5,6], but it doesn′t work.
The output would be something like this:
animals, pets, birds
tiger, lion, cat
It is possible to do some filtering like this?
Thanks
Sebastian
How are we now supposed to enter a website link that doesn’t show anything when the field is empty?
]]>This plugin is SUPER great! But, I have looked around the forum and the plugin info and I don’t see how to make this show up as a “grid”. I see mention of it, but nothing has worked. Right now, all info is stacked. Is there documentation (or just a shortcode you could provide) that shows how to have all staff show up as a grid? Or just other options than just stacked?
Please advise, thanks!
How could I change base URL “staff”?
thanks
]]>How could I change base URL “staff”?
thanks
]]>@adamtootle are you going to be updating the
static function photo_shortcode(){
$imagepath = self::photo_url_shortcode();
if(!empty( $imagepath)){
return '<img src="' . self::photo_url_shortcode() . '" />';
} else {
return "";
}
}
so that it no longer throws errors for older versions of PHP? Something like below. Your current version fatally errors. I work at Purdue and I’d like to continue to use your plugin but cannot if the future version does not fix the issue. Please respond soon. Thanks.
static function photo_shortcode(){
$imagepath = self::photo_url_shortcode();
if(!empty( $imagepath)){
return ‘<img src="' . self::photo_url_shortcode() . '" />';
} else {
return "";
}
}
]]>
Hello,
I am using this plugin with custom fields. I have the below custom template. I would like to add a featured image for each post/staff-member. How can I reference the featured image from within the custom template?
Thank you,
Peter.
<div class=”staff-directory”>
[staff_loop]
<b>[name]</b> – [position] – [email] – [phone_number]
[bio_paragraph]
<div class=”staff-directory-divider”></div>
[/staff_loop]
</div>
]]>https://bowman-painting.com/staff/ — haven’t edited the page in 2 years. Deactivated / Re-activated the Plugin… still nothing different. Searched for similar issues — didn’t find any in forums.
Please advise.
S
]]>The grid template has an issue in that it leaves blank spaces on the page. Using the grid template, my page looks like below, where x represents the photo, name, etc.
x x x
x x
x x x
x
x x
Upgraded Staff directory from 1.0.3 to 1.1.1 and it brought my web site down.
Fatal error: Can’t use function return value in write context in /home3/mghcorg/public_html/wp-content/plugins/staff-directory/classes/staff-directory-shortcode.php on line 91.
The function:
static function photo_shortcode(){
if(!empty(self::photo_url_shortcode())){
return ‘‘;
} else {
return “”;
}
}
is causing the error. Changed it to below and my site is working again. However, I know this is not the intent of the function. Please send correct code.
static function photo_shortcode(){
return ‘‘;
}
]]>hello,
I use the plugin for a private facebook of an association. you smust be logged to access to the facebook page
thanks to the new feature, single staff member pages, all besome public. To avoid, a just use the private key on each member.
The problem is that now, when i use [name], it display ‘private: name’
regards
]]>The new update to the plugin crashed my website. So, I deleted and re-installed the plugin, but it will not activate.
This fatal error appears …
Fatal error: Can’t use function return value in write context in /home/content/92/8416892/html/new/wp-content/plugins/staff-directory/classes/staff-directory-shortcode.php on line 91
]]>Where do we need to edit to change the format or structure to fit our template for the staff-directory staff member pages?
Thx,
David
Hello,
I just updated this plugin, and it made error 500.
I had to switch off the plugin.
Can you help me, why is that happened?
Thanks,
istvan
hello,
first, thank you for your plugin.
It is possible to add a conditionnal balise?
For example, i would like to display this line only if [website] exists
<div>Website</div>
regards
]]>Hi
I would like to listing orderby “surname” all staff list on the staff page. But I can listing just firstname.
Could you please help me for this issue.
Thanks
]]>Hello,
I am using plugin Version 1.0.3.
I have created a few categories and added staff to those categories. I’d like to build pages showing specific categories. The help says there is a attribute for the [staff-directory] shortcode (cat=1) but the categories I created in the UI are not getting an ID and there isn’t a place while editing the category to add a value to ID. What can I do?
Thank you,
Peter.
Is there a method to add two categories to the same shortcode?
]]>1. Would like to be able to show more than 20 results per page in WordPress.
2. Show staff categories in the results list so that I know at a glance which ones need to be edited. This is currently only partially possible if I click on Quick Edit, but I need to know which ones to select.
]]>Would like to be able to sort by the field position.
Right now there only appears to be the option for Name and ID.
]]>The most tedious part of using this plugin is needing to select the image.
How about a feature where if the image has a certain name “smith.jpg” then the plugin will automatically associate a picture with the person?
This would mean I could maybe upload files with a specific filename via FTP and do them in batch without needing to go through this entire selecting process for each staff.
]]>