Title: templating
Last modified: August 30, 2016

---

# templating

 *  [itchiweb](https://wordpress.org/support/users/johnii/)
 * (@johnii)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/templating/)
 * Hello
 * Could you give an example to use it in a template loop?
 * Thanks!
 * [https://wordpress.org/plugins/post-attached-media-downloads/](https://wordpress.org/plugins/post-attached-media-downloads/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Marius L. J.](https://wordpress.org/support/users/clorith/)
 * (@clorith)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/templating/#post-6247821)
 * Hi,
 * I’d be happy to (sorry for the late reply, apparently my RSS feed isn’t cooperating
   as I’d like 🙁 )
 * I’m using the following code on a realtor site, where they put up floor plans,
   schematics etc for download along with the properties they sell, so in my templates
   I’m pulling in the downloads inside The Loop
 *     ```
       $downloads = $pamd->get_downloads( NULL, false, 'array' );
   
       if ( ! empty( $downloads ) ) {
       	echo '<div class="span-12 property-downloads aside-container">';
       	printf(
       		'<h3>%s</h3>',
       		__( 'Downloads', 'theme' )
       	);
   
       	foreach( $downloads AS $download ) {
       		printf(
       			'<a href="%s">%s</a>',
       			esc_url( $download['url'] ),
       			esc_html( $download['label'] )
       		);
       	}
       }
       ```
   
 * I’m providing `NULL` for the post ID and `false` for the echo option as I don’t
   want it to output anything I just want the data so I can use it as I please

Viewing 1 replies (of 1 total)

The topic ‘templating’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/post-attached-media-downloads.svg)
 * [Post Attached Media Downloads](https://wordpress.org/plugins/post-attached-media-downloads/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-attached-media-downloads/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-attached-media-downloads/)
 * [Active Topics](https://wordpress.org/support/plugin/post-attached-media-downloads/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-attached-media-downloads/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-attached-media-downloads/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Marius L. J.](https://wordpress.org/support/users/clorith/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/templating/#post-6247821)
 * Status: not resolved