I have a very simple problem, I would like to add a conditional if statement for the following array. I would ONLY like to show the attachments in a widget if there is at least 10 attachments, otherwise I don't want to display the widget.
$args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'numberposts' => 10,
'post_status' => 'published',
'post_parent' => null,
);
$attachments = get_posts($args);
How would I create an if statement for a specific number of attachments grabbed by this array? For example, "if ($attachments > 10) {