Cómo controlar si un post de WordPress tiene adjuntos y mostrarlos
<?php $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ => null, ‘post_parent’ => $post->ID, ‘exclude’ => null ); //obtenemos los adjuntos del articulo $attachments = get_posts($args); if ($attachments) { //si...