Question

I am using the following code:

global $post;
$tmp_post = $post;

$staff = get_posts(array('numberposts' => -1, 'post_type'=> 'staff'));
$i = 0;
echo 'Staff number: '.count($staff);

and it echoes 'Staff number: 6' but if I run the following query

SELECT *
FROM `wp_posts`
WHERE `post_type` = 'staff'
LIMIT 0 , 30

it shows me the 7 members of the staff... any ideas on how to retrieve the 7 staff members by get_posts()?

Thank you

No correct solution

OTHER TIPS

It was a limitation of the Wordpress Theme that I was using.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top