Skip to content

Gallery of all attached images in WordPress

For a site I’ve been working one I wanted to automatically include a gallery of all the images attached to a post, and I wanted it to display exactly like a standard WordPress gallery would look.  The HTML is modeled after the gallery code from Twenty Thirteen.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
$args = array(
     'numberposts' => -1,
     'orderby' => 'menu_order',
     'order'=> 'ASC',
     'post_mime_type' => 'image',
     'post_parent' => $post->ID,
     'post_status' => null,
     'post_type' => 'attachment'
);
 
$images = get_children( $args );
 
if($images){ ?>
     <h2>Photos</h2>
 
     <div id='gallery-1' class='gallery galleryid-10 gallery-columns-4 gallery-size-thumbnail'>
          <?php foreach($images as $image){
               $image2 = wp_get_attachment_image_src( $image->ID, 'thumbnail'); ?>
               <dl class='gallery-item'><dt class='gallery-icon landscape'>
               <a href='<?php echo $image->guid; ?>'><img width="150" height="150" src="<?php echo $image2[0]; ?>" /></a>
               </dt></dl>
          <?php } ?>
          <br style='clear: both;' />
     </div>
<?php } ?>

SRS-Ninja Launch

My new Application SRS-Ninja is finished and ready for studying goodness 🙂

I suppose it’s technically in “Beta,” but it set and ready for user to make and study their own SRS decks.

SRS-Ninja is a SRS (specially repeated program) application where you can make your own deck, or study other people’s decks. SRS is pretty much just smart flash cards. It remembers which questions you get wrong and which ones you get right, and shows the ones that you need to work on.

Right now SRS-Ninja has a basic multiple choice mode version, and a more difficult hidden answer version. With the hidden answer version you have to guess the answer, then you can reveal it and see if you got it right.

MineCraft Skins

I’ve been getting into Minecraft recently and decided I wanted to change up my skin 🙂 I found it it’s really quite simple to make your own Minecraft skin – you just download the template from the site and you can change it in your favorite image editing software. I made a few skins below:

Foxu Shibaru:

 

Nanashi from Mar: