Hallo,
ich habe mir ein mehrspaliges Design gebaut, und habe nun die Ausgabe der Inhalte mit <?php query_posts( 'posts_per_page=20'); ?> auf 20 ausgegebene Artikel erhöht.
Wenn ich das aber getan habe, werden weitere Widgets in der Sidebar nicht mehr angezeigt. Wenn ich den entsprechenden Aufruf entferne läuft es einwandfrei!?!
Habe ich dort einen Gedankenfehler?
Mein Quelltext
PHP
<?php
get_header();
?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<?php if (in_category('wissen')) {?>
<h1 class="pagetitle">Batterie und Akku <?php wp_title('', true, 'right'); ?></h1>
<?php query_posts( 'posts_per_page=20'); ?>
<?php } else {?>
<h1 class="pagetitle"><?php wp_title('', true, 'right'); ?></h1>
<?php } ?>
<?php } ?>
<div id="inhalt">
<?php if (have_posts()) : ?>
<? $post_counter = 0; ?>
<?php while (have_posts()) : the_post(); ?>
<? if($post_counter == 0) { ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><a class="postHeading" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="entry">
<?php the_excerpt(); ?> <a href="<?php the_permalink(); ?>" rel="nofollow" title="Permanenter Link zu <?php the_title(); ?>">...mehr zu <?php the_title(); ?></a> <?php edit_post_link('bearbeiten', '', ''); ?>
</div>
</div>
<? $post_counter++ ?>
<? } else if($post_counter > 0) { ?>
<div class="mini-post" id="post-<?php the_ID(); ?>">
<h2><a class="postHeading" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="entry">
<?php the_excerpt(); ?> <a href="<?php the_permalink(); ?>" rel="nofollow" title="Permanenter Link zu <?php the_title(); ?>">mehr ...</a> <?php edit_post_link('bearbeiten', '', ''); ?>
</div>
</div>
<? if($post_counter % 2 == 0) { echo "<hr />"; } ?>
<? $post_counter++ ?>
<? } ?>
<?php endwhile; ?>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Alles anzeigen
Liveversion: http://batterie-info.de/Thema/akku/wissen/