Support » Plugin: Simple Staff List » Show paginate

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

    (@brettshumaker)

    Unfortunately, right now there isn’t support for pagination.

    NicheLabs

    (@allennichelabs)

    Any plans on getting this added sometime soon. I love this plugin and have been able to get it to do just about everything I need it to, except for this and this is a very important aspect.

    I’m working on a project that has over 70 staff members and the client doesn’t want them all listed on one page.

    It wasn’t until now that I was able to add all the staff members and discovered that there was no pagination support.

    Any suggestions would be greatly appreciated.

    NicheLabs

    (@allennichelabs)

    Okay I found a round-about way to resolve this.

    I’m not exactly clear on why this works but it does for me at least.

    In the file simple-staff-list.php I changed the following:
    ‘rewrite’ => array(‘slug’=>’staff-member’,’with_front’=>false),

    To this:
    ‘rewrite’ => array(‘slug’=>’people’,’with_front’=>false),

    Where ‘people’ is an actual page on my site.

    For whatever reason by doing this it now allows me to use my theme for custom post types, so I now am using archive-staff-member.php and single-staff-member.php to control the display of staff members.

    This bypasses the “template” settings in the plugin’s setups.

    I had to make some adjustments to these files in order to pull the information from the custom post type as I described here:
    http://wordpress.org/support/topic/custom-post-template-for-single-staff-member?replies=3

    I also had to incorporate the following code:

    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    					$temp = $wp_query;
    					$wp_query = null;
    					$wp_query = new WP_Query();
    					$wp_query -> query('post_type=staff-member&showposts=10'.'&paged='.$paged.'&orderby=title&order=ASC');
    					if ($wp_query->have_posts()) :
    					while ($wp_query->have_posts()) : $wp_query->the_post(); ?>

    Which now allows me to use any pagination method I choose, whether it’s WordPress’s default or any pagination plugin.

    I hope this helps someone and I especially hope that it is clear.

    NicheLabs

    (@allennichelabs)

    Just discovered one issue with this method.

    If I have subpages setup under People and try to display different groups (like Managers) I get a 404 error.

    The link shows up as http://domainname.com/people/managers.
    I have a page setup called Managers with the parent set for People.
    I have the shortcode [simple-staff-list group=”managers”] on the Managers page.

    I know this has to do with a conflict with the plugin using the same permalink as the page People. But that was the only way I could get pagination to work.

    If anyone has any idea how to fix this I would appreciate some help.

    I’ll keep looking into it to see if I can find another workaround.

    NicheLabs

    (@allennichelabs)

    Okay I finally managed to get this. It’s quite involved so if you need to know please ask and I explain it further.

    It involves using wp_list_cagegories to build the list of groups and then creating a taxonomy-sfaff-member-group.php file that queries the post type and the staff-member-group for the current term, obtained by using $wp_query->query_vars[‘staff-member-group’]

    I think you’re getting at what I want to do as well.. I am tentatively going to have over 100 staff members listed to the organization and I would like to break it up into pages, so 10 per page in ascending order.. I can’t even get the ascending command to work properly let alone the challenge to break them up into pages like regular posts..

    Help?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show paginate’ is closed to new replies.