Exemplo n.º 1
0
/images/arrow_next.png" width="65px" heigth="49px"></a> <?php 
    } else {
        // Display previous_page arrow if we're not on page 1
        if ($current_page >= 1 and $i == 16) {
            ?>
					
					<a class="nav_photo first_column" href="<?php 
            previous_posts();
            ?>
"><img src="<?php 
            bloginfo('stylesheet_directory');
            ?>
/images/arrow_prev.png" width="65px" heigth="49px"></a><?php 
        } else {
            // Display thumnail with selected-photo and new_row style
            echo douce_thumbnail($post, $i == 0, $i % 4 == 0);
        }
    }
    $i += 1;
}
// If needed, add missing cases until reacing previous_page link
if ($current_page >= 1 and $i < 16) {
    $missing_cases = 16 - $i;
    for ($j = 0; $j < $missing_cases; $j++) {
        // Dont forget to increment $i to take care of first_column border
        ?>
 <div class="empty_thumb <?php 
        if ($i % 4 == 0) {
            echo "first_column";
        }
        ?>
Exemplo n.º 2
0
function display_thumbnails($offset = 0, $current_page = 0)
{
    $thumbnails = query_thumbnails($offset);
    $i = 1;
    // FIXME: should not be necessary,
    // small hack to not re-display main_thumbnail
    if (is_front_page()) {
        $thumbnails->the_post();
    }
    while ($thumbnails->have_posts()) {
        $thumbnails->the_post();
        global $post;
        // If we reach last thumbnail, display next_page arrow instead of the last thumbnail
        if ($i == 19 and !is_front_page()) {
            ?>
		
			<a class="thumbnail" href="<?php 
            next_posts();
            ?>
"><img src="<?php 
            bloginfo('stylesheet_directory');
            ?>
/images/arrow_next.png" width="65px" heigth="49px"></a> <?php 
        } else {
            // Display previous_page arrow if we're not on page 1
            if ($current_page >= 1 and $i == 16) {
                ?>
				
				<a class="thumbnail first_column" href="<?php 
                previous_posts();
                ?>
"><img src="<?php 
                bloginfo('stylesheet_directory');
                ?>
/images/arrow_prev.png" width="65px" heigth="49px"></a><?php 
            } else {
                // Display thumnail with selected-photo and new_row style
                echo douce_thumbnail($post, $i == 0, $i % 4 == 0);
            }
        }
        $i += 1;
    }
    // If needed, add missing cases until reacing previous_page link
    if ($current_page >= 1 and $i < 16) {
        $missing_cases = 16 - $i;
        for ($j = 0; $j < $missing_cases; $j++) {
            // Dont forget to increment $i to take care of first_column border
            ?>
 <div class="empty_thumb <?php 
            if ($i % 4 == 0) {
                echo "first_column";
            }
            ?>
"></div> <?php 
            $i += 1;
        }
        ?>
<a class="thumbnail first_column" href="<?php 
        previous_posts();
        ?>
"><img src="<?php 
        bloginfo('stylesheet_directory');
        ?>
/images/arrow_prev.png" width="65px" heigth="49px"></a><?php 
    }
}