I just checked my theme and this function is breaking the gallery functionality
add_action('pre_get_posts','allow_pending_posts_wpse_103938');
function allow_pending_posts_wpse_103938($qry) {
if (!is_admin() && current_user_can('upload_files')) {
$qry->set('post_status', array('publish','pending','draft'));
}
}
It basically adds post that are pending to the post archive.
Does anyone now why it is breaking the ACF gallery?
Thanks