WordPress.org

Ready to get started?Download WordPress

Forums

Attachments
[resolved] Use out of loop (2 posts)

  1. nicktoll
    Member
    Posted 1 year ago #

    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

    http://wordpress.org/extend/plugins/attachments/

  2. Jonathan Christopher
    Member
    Plugin Author

    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.