WordPress.org

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Get Attachments

This plugin is used to fetch the image attachments of a post or page

Extract the zip file and put wp-get-attachments in wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

call following function if( function_exists( 'wp_get_attachments' ) ) $attachments = wp_get_attachments(); in any of your template file .

if( function_exists( 'wp_get_attachments' ) ) $attachments = wp_get_attachments( 101 , 20 , 'Sorry nothing found' ); this function accepts following three parameters

  • 1. $post_id ( id of the post/page whoose attachments need to be fetched . if used with in standard wordpress loop then it will use current post id ).
  • 2. $num_of_attachments ( number of attachments to be fetched , defaults to all attachments of a post )
  • 3. $no_result_msg ( message to be shown when no attachments is there , defaults is 'No Attachmets found' )

Note: You can call this function with 1,2,3 or none parameters .

Requires: 1.2.0 or higher
Compatible up to: 3.5.2
Last Updated: 2013-4-9
Active Installs: 40+

Ratings

5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1