Hallo Gemeinde!
Ich baue eine index mit 2 Loops. Einmal die letzten 3 Einträge in groß und dann die letzten 16 als kleine Bildchen. Das geht gut soweit.
Der Link "next_posts_link()" erzeugt aber leider keine Seite, auf der die Einträge 17-32 zu sehen sind, sondern er erzeugt die selbe Ansicht wieder.
Warum tut er das?
Hier der entsprechende Teil der Index:
PHP
<?php query_posts('showposts=3'); ?> <!-- Anzahl der Posts, die im Slider gezeigt werden sollen -->
<div id="slider1" class="sliderwrapper"> <!-- Beginn Slider -->
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="contentdiv">
<a href="<?php the_permalink() ?>">
<?php $image= get_post_meta($post->ID, 'image', true); ?>
<?php if(!(empty($image))) { ?>
<img class="sliderimage" src="<?php echo $image; ?>" />
<?php } else { ?>
Es wurde kein benutzerdefiniertes Feld erstellt.
<?php } ?>
</a>
<div class="slidertext">
<span class="titleFONT "><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></span> <br>
<span class="subtitleFONT "><?php the_content('//weiter'); ?></span>
</div>
</div>
<?php endwhile; ?>
</div> <!-- Ende Slider -->
<?php query_posts('showposts=16'); ?> <!-- Anzahl der Posts, die klein gezeigt werden sollen -->
<div id="main"> <!-- Anfang main: Seiteninhalte -->
<?php while (have_posts()) : the_post(); ?>
<div class="tockiroll">
<div class="heading"><span><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></span></div>
<a href="<?php the_permalink() ?>">
<?php $thumb= get_post_meta($post->ID, 'thumb', true); ?>
<?php if(!(empty($thumb))) { ?>
<img class="thumbimage" src="<?php echo $thumb; ?>" />
<?php } else { ?>
<img class="thumbimage" src="http://www.blog.tocki.de/wp-content/uploads/2009/07/frage.jpg" />
<?php } ?>
</a>
<div class="caption"><span><?php the_excerpt(); ?></span>
</div>
</div>
<?php endwhile; ?>
<div style="clear:both;"></div>
</div> <!-- Ende main: Seiteninhalte -->
<?php next_posts_link('« Older Entries') ?> | <?php previous_posts_link('Newer Entries »') ?>
<?php else : ?>
...
<?php endif; ?>
Alles anzeigen