Increasing amount of staff shown
URL to the page in question:
-
The staff page only displays 10 staff members, I’d like it to display more can you direct me on how to do this? Thanks
http://www.ccfministry.com/ccf2/staff/
James,
You can change the number. By default the staff section will show the same number as the number of posts set in the Reading settings of your site. I just added an option to allow end users to set a separate number of staff in the Foundation theme. Here’s how to add it to Responsive Visual:
- Go to the Appearance section in your WordPress control panel and select Edit.
- From the list of files on your right, choose queries.php.
- Replace this section:
if ( is_tax( 'staff-group' ) ) {
// displays in post order
$query->set( 'order', 'ASC' );
$query->set( 'orderby', 'menu_order' );
return;
}
with this:
if ( is_tax( 'staff-group' ) ) {
// displays in post order
$query->set( 'order', 'ASC' );
$query->set( 'orderby', 'menu_order' );
$query->set( 'posts_per_page', 30 );
return;
}
- The 30 in that next to last line is the number of staff member that will be shown per page. Feel free to change that to a different number.
- Update your settings.
That should change the number shown per page. If you run into any trouble, let me know,
Bill
I tried that and it still won’t display over 10. Any other ideas? http://www.ccfministry.com/ccf2/staff/
At the bottom of the page it shows “older entries” (which I don’t want it to show). When I click that it goes to this page http://www.ccfministry.com/ccf2/staff/page/2/
Thanks for your help
Can you email a login so I can take a look for you? Something has to be interfering with the pre_get_posts for that not to change it, but I’m not sure what is.
Thanks. I feel silly. I was thinking about staff groups and not the staff page template. I made a quick change to the template and you should be able to see everyone on one page now.
I also noticed that your sub-menus were overlapping the main navigation just a bit. That can happen sometimes when changing fonts. I added a style to the bottom of your style.css file to help it line up like it should.
If you have any trouble, let me know,
Bill
- The topic ‘Increasing amount of staff shown’ is closed to new replies.