Could you provide an example of how to use this plugin to list attachments (linked to a particular page / post) 'out of the loop' (i.e. on a totally separate page) using the page / post ID?
Thanks,
Nick
Could you provide an example of how to use this plugin to list attachments (linked to a particular page / post) 'out of the loop' (i.e. on a totally separate page) using the page / post ID?
Thanks,
Nick
Hey Nick, Attachments has just been updated to version 3.0 but if you don't plan on upgrading you can just pass the post ID you're looking for to attachments_get_attachments(). For example:
$attachments_for_post_id_123 = attachments_get_attachments( 123 );
and you should be good to go!
You must log in to post.