Created
May 23, 2011 11:53
-
-
Save EdwardIII/986592 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* Get the images for the concertina */ | |
| $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID, 'order_by' => 'menu_order', 'order' => 'asc' ); | |
| $attachments = get_posts($args); | |
| print_r($attachments); | |
| if ($attachments) : ?> | |
| <div id="tabs"> | |
| <ul> | |
| <?php $i = 0; foreach ( $attachments as $attachment ): ?> | |
| <li> | |
| <h2><a href="#<?php echo $attachment->post_name ?>"><?php echo apply_filters( 'the_title' , $attachment->post_title ); ?></a></h2> | |
| <!-- <p><a href="#<?php echo $attachment->post_name ?>"><?php echo apply_filters( 'the_title' , $attachment->post_excerpt); ?></a></p> --> | |
| <p><?php echo apply_filters('the_title', $attachment->post_excerpt); ?></p> | |
| </li> | |
| <?php $i++; endforeach; reset($attachments); ?> | |
| </ul> | |
| <?php foreach ( $attachments as $attachment ) : ?> | |
| <div id="<?php echo $attachment->post_name ?>"> | |
| <div class="inner-attachment"> | |
| <h3><?php echo apply_filters( 'the_title' , $attachment->post_title ); ?></h3> | |
| <p><?php echo apply_filters( 'the_content' , $attachment->post_content); ?></p> | |
| </div> | |
| <?php the_attachment_link( $attachment->ID , true); ?> | |
| </div><!-- div name of post --> | |
| <?php endforeach; ?> | |
| </div><!-- .home-gallery --> | |
| <? endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment