Title: cpohl's Replies | WordPress.org

---

# cpohl

  [  ](https://wordpress.org/support/users/cpohl/)

 *   [Profile](https://wordpress.org/support/users/cpohl/)
 *   [Topics Started](https://wordpress.org/support/users/cpohl/topics/)
 *   [Replies Created](https://wordpress.org/support/users/cpohl/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/cpohl/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/cpohl/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/cpohl/engagements/)
 *   [Favorites](https://wordpress.org/support/users/cpohl/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Better Attachments] Using WPBA with Subpages](https://wordpress.org/support/topic/using-wpba-with-subpages/)
 *  Thread Starter [cpohl](https://wordpress.org/support/users/cpohl/)
 * (@cpohl)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/using-wpba-with-subpages/#post-6100305)
 * 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)