How to get children/attachments in header?
From Codex: get_children – examples: If you just want to get or display attachments, it’s probably a little easier to use get_posts() instead. So you might go on and do that, the link in above cite leads to an example. Besides that change your code to: global $post; // array with parameters $args = array( … Read more