SHARE
TWEET

Attachment hook in single.php

a guest Jan 9th, 2013 56 Never
  1.                 <?php
  2.                 $args = array('post_type' => 'attachment','post_mime_type' => 'image' ,'post_status' => null, 'post_parent' => $post->ID);
  3.                 $attachments = get_posts($args);
  4.                 if ($attachments) {
  5.                 ?>
  6.                 <div id="galleryToggle" class="toggleButton closed"><span>+</span>Gallery</div>
  7.                 <ul class="galleryBox">
  8.                 <?php attachment_toolbox('small'); ?>
  9.         </ul>
  10.                 <?php } ?>
RAW Paste Data
Top