Hi all,
I am using Wordpress for a client's website.
I was wandering if is there some easy way to access to all the files names attached to a post from the code running in a page template
Thank you in advance, I hope this makes sense
Andrea
Hi all,
I am using Wordpress for a client's website.
I was wandering if is there some easy way to access to all the files names attached to a post from the code running in a page template
Thank you in advance, I hope this makes sense
Andrea
well... If for sombody can be interesting,I solved the problem by using the wpdb object (http://codex.wordpress.org/Function_Reference/wpdb_Class)
This works even in a template!
Here is the code I used
$my_query = "select guid from wp_posts where (post_parent=$post-ID and (post_mime_type='image/gif') OR (post_mime_type='image/png') OR (post_mime_type='image/jpg')";
$res = $wpdb->get_row($my_query,ARRAY_A);
Andrea,
What do you do beyond this?
This topic has been closed to new replies.