How to use staff template

This support request was posted in Paeon by davidbivins

Request ID #3033 In Progress
  • 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.

    Never 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.

    Hi,
    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.

    Hi 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.

    Thanks, 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.

    Hi 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.

    Happy 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);
    }
    }`

    O.k., that didn’t work 🙂


    set('posts_per_page', 15);
    }
    }

    So 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.

    Hi 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.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server