Title: Patrik's Replies | WordPress.org

---

# Patrik

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

 *   [Profile](https://wordpress.org/support/users/agegap/)
 *   [Topics Started](https://wordpress.org/support/users/agegap/topics/)
 *   [Replies Created](https://wordpress.org/support/users/agegap/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/agegap/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/agegap/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/agegap/engagements/)
 *   [Favorites](https://wordpress.org/support/users/agegap/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: [[User Frontend – Membership, User Registration, User Profile, User Directory & Content Restriction with Frontend Post Submission] [Plugin: WP User Frontend] Showing uploaded images](https://wordpress.org/support/topic/plugin-wp-user-frontend-showing-uploaded-images/)
 *  [Patrik](https://wordpress.org/support/users/agegap/)
 * (@agegap)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-user-frontend-showing-uploaded-images/#post-2657551)
 * Thanks for this info! Also, in reply to an above question, you could restrict
   it based on category using the WP conditional:
 * <?php
    if ( in_category( ‘your_category’ )) { YOUR CODE } ?>
 * So, for example:
 *     ```
       <?php
       if ( in_category( 'your_category' )) {
           $args = array(
               'post_type' => 'attachment',
               'numberposts' => null,
               'post_status' => null,
               'post_parent' => $post->ID
           );
           $attachments = get_posts($args);
           if ($attachments) {
               foreach ($attachments as $attachment) {
                   echo wp_get_attachment_image($attachment->ID, 'medium');
               }
           }
       }
       ?>
       ```
   

Viewing 1 replies (of 1 total)