<?php
/**
 * The template for displaying posts in the Gallery Post Format on index and archive pages
 *
 * @package WordPress
 * @subpackage Bouquet
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
	<header class="entry-header">
		<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'bouquet' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>

		<?php bouquet_posted_on(); ?>

	</header><!-- .entry-header -->

	<?php if ( is_search() ) : // Only display Excerpts for search pages ?>
	<div class="entry-summary">
		<?php the_excerpt(); ?>
	</div><!-- .entry-summary -->
	<?php else : ?>
	<div class="entry-content">
		<?php if ( post_password_required() ) : ?>
			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'bouquet' ) ); ?>

			<?php else : ?>
				<?php
						$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'rand', 'order' => 'ASC', 'numberposts' => 999 ) );
						if ( $images ) :
							$total_images = count( $images );
示例#2
0
				<article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class();
    ?>
>
					<header class="entry-header">
						<h1 class="entry-title"><?php 
    the_title();
    ?>
</h1>

						<?php 
    bouquet_posted_on();
    ?>

						<div class="entry-meta">
							<?php 
    $metadata = wp_get_attachment_metadata();
    printf(__('Published at <a href="%1$s" title="Link to full-size image">%2$s &times; %3$s</a> in <a href="%4$s" title="Return to %5$s" rel="gallery">%5$s</a>', 'bouquet'), wp_get_attachment_url(), $metadata['width'], $metadata['height'], get_permalink($post->post_parent), get_the_title($post->post_parent));
    ?>
							<?php 
    edit_post_link(__('Edit', 'bouquet'), '<span class="edit-link">', '</span>');
    ?>
						</div><!-- .entry-meta -->

						<nav id="image-navigation">
							<span class="previous-image"><?php 
    previous_image_link(false, __('&larr; Previous', 'bouquet'));