Viewing 1 replies (of 1 total)
  • Plugin Author Marius L. J.

    (@clorith)

    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.