Using WPBA with Subpages
-
Hello everyone,
I’m trying to use WBPA on page to display attachments of a subpage.
I have a magazine page where the page current issue is the parent page, the issue itself (eg. N°1/2015) is a subpage. I attached several files to my subpage and want to show these attachments on the parent page.I am using the following (not working) code for my parent page template:
<?php $attachments = array( 'post_type' => 'attachment', 'post_parent' => 23, 'numberposts' => -1 ); $attachments = get_posts($args); if ($attachments) { echo wpba_attachment_list( array( 'open_new_window' => true, 'show_icon' => true, 'icon_size' => array( 48, 48 ), 'no_attachments_msg' => 'null', ) ); } ?>
Does anybode have an idea why the code above does not work?
The plugin itself is a great piece of coding! And works like a charm on regular pages. ??
Thanks a lot!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using WPBA with Subpages’ is closed to new replies.