Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter cpohl

    (@cpohl)

    Hey,

    using the wpba_attachment_list itself it wont’t work.
    I used the following code:

    <?php
    		echo wpba_attachment_list( array(
    			'open_new_window'      => true,
    			'show_icon'            => true,
    			'icon_size'           => array( 48, 48 ),
    			'no_attachments_msg'   => 'null',
    		) );
    ?>

    Replies “Sorry, no attachments exist.”
    If I am using wordpress get_posts function it works:

    <?php
    $args = array(
    	'post_type' => 'attachment',
    	'post_parent' => $page->ID,
    	'numberposts' => -1,
    	);
    $attachments = get_posts($args);
    if ($attachments) {
    	foreach ($attachments as $attachment) {
    		echo the_attachment_link($attachment->ID, false);
    	}
    }
    ?>

    :/

Viewing 1 replies (of 1 total)