Title: Lukis's Replies | WordPress.org

---

# Lukis

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

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

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Attachments] Attachments doesn't appear in my theme](https://wordpress.org/support/topic/attachments-doesnt-appear-in-my-theme/)
 *  [Lukis](https://wordpress.org/support/users/lukis/)
 * (@lukis)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/attachments-doesnt-appear-in-my-theme/#post-2875060)
 * You will need to edit your theme files where applicable.
 * Here is a basic implementation:
 *     ```
       <?php
         if( function_exists( 'attachments_get_attachments' ) )
         {
           $attachments = attachments_get_attachments();
           $total_attachments = count( $attachments );
           if( $total_attachments ) : ?>
             <ul>
             <?php for( $i=0; $i<$total_attachments; $i++ ) : ?>
               <li><?php echo $attachments[$i]['title']; ?></li>
               <li><?php echo $attachments[$i]['caption']; ?></li>
               <li><?php echo $attachments[$i]['id']; ?></li>
               <li><?php echo $attachments[$i]['location']; ?></li>
               <li><?php echo $attachments[$i]['mime']; ?></li>
               <li><?php echo $attachments[$i]['filesize']; ?></li>
             <?php endfor; ?>
             </ul>
           <?php endif; ?>
       <?php } ?>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Attachments] How to hide attachments on password protected post?](https://wordpress.org/support/topic/how-to-hide-attachments-on-password-protected-post/)
 *  [Lukis](https://wordpress.org/support/users/lukis/)
 * (@lukis)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/how-to-hide-attachments-on-password-protected-post/#post-2316407)
 * I used this:
 *     ```
       <?php if ( ! post_password_required() && ( is_page() ) ) : ?>
       YOUR CODE HERE
       <?php endif; ?>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)