WordPress the_content() return only one image from a specific category

You are trying to get the ID via $post->ID, but that will only return the post ID of the first post. You can use global $post; before the args array, or much simpler replace $post->ID by the function get_the_ID(). $args = array(‘post_type’ => ‘attachment’, ‘numberposts’ => 34, ‘post_status’ => null, ‘post_parent’ => get_the_ID());

PHP 5+ stream wrappers with the underlying WordPress File API?

I’ve been pointed at the GSoC project, but I haven’t explored its finer points, yet. (Looks like that will take a decent chunk of time.) Practically speaking, I tried to use WordPress with stream wrappers, and I immediately found that wp_mkdir_p() and the GD functions imagejpeg(), imagegif() and imagepng() were incompatible. I’ve submitted a patch … Read more

Why can I not use setup_postdata($post) in the sidebar?

Your function works in your page template but not in the sidebar because at the point that your template is processed, $post already contains the post that has been loaded for the page. I tried your code and, just like Michael said, all I needed to add was the global declaration of $post inside the … Read more