I'm attempting to use 'get_posts' to get posts which are in 2 groups. Presently I'm by using this: $myposts = get_posts('numberposts=1&category=4&category=7');

This accumulates posts which are in both category 4 or 7. The posts I wish to get should be both in groups at the same time. Any suggestions?

Make use of this

$myposts = get_posts('numberposts=1&category=4,7');