Hi,
ich versuche zwei verschiedene Kategorien und 5 posts auf einer Seite auf einer Seite auszugeben.
PHP
<?php get_header(); ?>
<?php get_sidebar();?>
<div id="content">
<div class="grid_8">
<div class="room">
<h2 class="h2">Aktuelle Diskussionsbeiträge</h2>
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query( array( 'category__and' => array( 429, 1335 ), 'showposts=5'.'&paged='.$paged));
?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div class="grid_8">
<h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Dauerhafter Link auf <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
<?php the_excerpt(); ?>
</div><?php endwhile; ?>
<?php endif; ?>
<div class="grid_8">
<?php if (function_exists('postbar')) postbar(); ?>
</div>
<div class="text grid_8">
<?php wp_reset_query();
if( have_posts() ) : while( have_posts() ) : the_post();
the_content();
endwhile; endif; ?>
</div>
</div></div>
<div class="grid_4 kontakt">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Seitenleiste Medienecho") ) : ?>
<?php endif; ?>
</div>
</div><!-- close #content -->
<div class="clear"></div>
<?php get_footer(); ?>
Alles anzeigen
Kann bitte jemand mal drübergucken, wo der Fehler ist? Finde ihn absolut nicht.
Danke!