How to use staff template
This support request was posted in Paeon by davidbivins
- davidbivins December 31, 2013 at 5:14 am
Hi,
The Paeon documentation does not mention the “staff” template. I would like to know how to manage the content on that page (uploading images, short description vs. long description, etc.).
Thanks!
David.
davidbivins December 31, 2013 at 5:27 amNever mind for now! I’ve just found the left nav item corresponding to it. I hope to figure out how it all works. Looks pretty straightforward.
davidbivins December 31, 2013 at 5:52 amHi,
I’ve used the excerpt field for the longer bio, which makes the individual staff member’s page render correctly, but I get that longer bio on the department page as well. Also, we only have one “department,” so I’d like to remove the department name from the staff page and the individual staff member’s page altogether. Do I have to edit each of those PHP pages to remove it?
I did find a workaround for re-ordering the staff members (I saw another user had an issue with that). I just edited the dates for each entry.Thanks!
David.
Juanfra Aldasoro December 31, 2013 at 1:52 pmHi David,
Thanks for writing. Yes, in order to remove the Deparment on each staff, in the Staff template you’ll need to edit the file template-staff.php
Basically where it says:
echo get_the_term_list( get_the_ID(), 'department', '', ', ', '');
Best,
Juan.davidbivins December 31, 2013 at 6:49 pmThanks, Juan. Done.
Is there a limit on the number of staff in a department? I have 12 teachers at the yoga studio, but only 10 are showing up. They are all assigned to the same department.
Thanks,
David.
Juanfra Aldasoro December 31, 2013 at 8:16 pmHi David,
No problem
Actually, there’s a way to modify the limit of that template, you’ll need to add the following function in your functions.php file:
add_action('pre_get_posts', 'nice_deparment_num_of_posts' ); function nice_deparment_num_of_posts( $wp_query ) { if ( is_tax( 'deparment' ) && is_main_query() ) { $wp_query->set('posts_per_page', 15); } }
You can change 15 to whatever you need. If you want to list them all, use -1
In that code, replace
&&
with &&
Happy new year,
Juan.davidbivins December 31, 2013 at 9:37 pmHappy New Year Juan,
That didn’t seem to work. I tried the value of -1 and 15. Any other ideas? I copied functions.php below:
`set(‘posts_per_page’, 15);
}
}`davidbivins December 31, 2013 at 9:39 pmSo I’m apparently not good at the markup codes for this forum. Anyway, I copied and pasted your code and replaced the ampersands as you specified.
Juanfra Aldasoro December 31, 2013 at 9:40 pmHi David,
Thanks for your response. Maybe is just a matter of how the text is copied over the code renderer we have in our forums. Would you send me your functions.php file to support@nicethemes.com?
Best,
Juan.
You must be logged in to reply to this topic.