Ich habe auf der Startseite eine Beschränkung eingebaut die nur Artikel von der Kategorie 1 (Allgemein) anzeigt:
PHP
<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php include (TEMPLATEPATH . '/right-sidebar.php'); ?>
<div id="content">
<?php if (have_posts()) : ?>
<?php $postcounter = 0; ?>
<?php while (have_posts()) : the_post(); ?>
<?php if (in_category(1)) { ?>
<?php $postcounter++; ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent Link to','zyblog27'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<p class="date"><i><?php the_time (__('m/d/Y','zyblog27'))?>
<!-- (Kategorie<?php the_category(', ') ?>) --></i> (<?php edit_post_link(__('Edit','zyblog27'), '', ''); ?>)</p>
<div class="entry">
<?php the_content(__('Read the rest of this entry »','zyblog27')); ?>
</div>
<p class="category"><!-- Hier war es einmal der Kommentar-Link--></p>
</div>
<?php } ?>
<?php endwhile; ?>
<div class="bottomnavigation">
<div class="alignleft"><?php next_posts_link(__('« Previous Entries','zyblog27')) ?></div>
<div class="alignright"><?php previous_posts_link(__('Next Entries »','zyblog27')) ?></div>
</div>
<?php else : ?>
<div id="page">
<h1 class="center"><?php _e('Not Found','zyblog27'); ?></h1>
<p class="center"><?php _e('Sorry, but you are looking for something that isn\'t here.','zyblog27'); ?></p>
<p class="center"><?php _e('Perhaps you would like to try a search or select from one of the links on the menu.','zyblog27'); ?></p>
</div>
<?php endif; ?>
</div>
<?php get_footer(); ?>
Alles anzeigen
Im Moment ist die Startseiteauf einen Artikel pro Seite beschränkt.
Das Problem ist nur, wenn ich einen Artikel erstelle mit einer anderen Kategorie als Allgemein, wird der schon etwas ältere Artikel mit der Kategorie Allgemein eine Seite verschoben und stattdessen ein weißes Blatt angezeigt.
Was mache ich falsch?
Danke im Vorraus
Robo01