I have the following code (sorry for the spanish):
// Argumentos para traernos el thumbnail $argumentos = array( 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'ASC', 'post_type' => 'attachment', 'post_parent' => $post->ID, 'post_status' => null, 'exclude' => $logo, 'post_mime_type' => 'image' ); $imagenes = get_posts( $argumentos ); print_r($argumentos); print_r($imagenes);
The array of arguments seems fine and this is actually a copy/paste from an old code that I was using before but for some reason get_posts is returning an empty array.
I'm starting to think that the problem might be related to the new media managemente on version 3.5.
Does anyone know how to accomplish something similar or does anyone can catch the problem?