Ernüchternd: Ich habe ein Problem mit der Sortierung meiner Posts.
Um diese Seite geht's: http://www.blackberry-apps.de
Da sollen eigentlich 9 Posts pro Seite stehen, zeitlich absteigend. Wenn man dann auf die zweite Seite klickt, sollte man die nächsten (älteren) 9 Posts sehen.
Aber genau das funktioniert nicht. Auf der zweiten Seite (Klick auf die Pagebar) stehen die gleichen Posts.
Das hier steht in der index.php:
PHP
<?php get_header(); ?>
<?php include(TEMPLATEPATH."/l_sidebar.php");?>
<div id="contentleft">
<div id="column_01">
<?php query_posts('showposts=3') ?>
<?php $posts = get_posts('numberposts=3&offset=0'); foreach ($posts as $post) : start_wp(); ?>
<?php static $count1 = 0; if ($count1 == "3") { break; } else { ?>
<div id="box">
<h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php the_content(__('Read more'));?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?> <br />
</div>
<?php $count1++; } ?>
<?php endforeach; ?>
</div>
<div id="column_wrap">
<div id="column_02">
<?php query_posts('showposts=3'); ?>
<?php $posts = get_posts('numberposts=5&offset=3'); foreach ($posts as $post) : start_wp(); ?>
<?php static $count2 = 0; if ($count2 == "3") { break; } else { ?>
<div id="box">
<h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php the_content(__('Read more'));?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?> <br />
</div>
<?php $count2++; } ?>
<?php endforeach; ?>
</div>
<div id="column_03">
<?php query_posts('showposts=3'); ?>
<?php $posts = get_posts('numberposts=3&offset=6'); foreach ($posts as $post) : start_wp(); ?>
<?php static $count3 = 0; if ($count3 == "3") { break; } else { ?>
<div id="box">
<h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php the_content(__('Read more'));?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?> <br />
</div>
<?php $count3++; } ?>
<?php endforeach; ?>
</div>
<div id="pagebar">
<?php if (function_exists('postbar'))
postbar();?>
</div>
</div>
</div>
<?php include(TEMPLATEPATH."/r_sidebar.php");?>
</div>
<!-- The main column ends -->
<?php get_footer(); ?>
Alles anzeigen
Ich weiß nicht, wie das funktionieren soll. Irgendeine Angabe fehlt.
Kann mir da jemand weiter helfen - nur ein Stichwort bitte, dann google ich weiter.
Vielen Dank & Beste Grüße
cav