[FONT=arial][FONT=trebuchet ms]Hallo,
Ich möchte nur Artikel aus der auslesen aus der gerade
angezeigt kategorie:
[/FONT][/FONT]
[FONT=arial]Leider zeigt er die Artikel der Kategorie an in der Sie
noch einsortiert sind.
Und zusätzlich soll immer der erste Artikel anders
dargestellt werden.
[FONT=trebuchet ms]
[/FONT][/FONT]
[FONT=arial][FONT=trebuchet ms]http://www.www.de/category/seo/[/FONT][/FONT]
[FONT=arial][FONT=trebuchet ms]
[/FONT][/FONT]
[FONT=arial][FONT=trebuchet ms]Quellcode:[/FONT]
PHP
<div class="first-article">
<?php global $post;?>
<?php $project_category = get_the_category($post->ID);?>
<?php $project_category = $project_category[0]->cat_ID; ?>
<?php if (have_posts()) : ?>
<!-- Erster Beitrag -->
<?php $top_query = new WP_Query(array('category__in' => $project_category , 'showposts' => '1')); ?>
<?php while($top_query->have_posts()) : $top_query->the_post();$do_not_duplicate = $post->ID; ?>
<h2 title="<?php the_title(); ?>">
<?php $suchwort = get_post_custom_values('Beitrags-Title'); ?>
<?phpif(!(empty($suchwort))) { ?>
<?php echo $suchwort[0]; ?>
<?php } ?></h2>
<?php the_content(); ?>
<?php endwhile; ?>
</div>
Alles anzeigen
[/FONT][FONT=arial]
[/FONT][FONT=arial]
PHP
<div class="other-article">
<!-- Weitere Beiträge -->
<?php $top_query2 = new WP_Query( array('category__in' => $project_category , 'showposts' => '75','offset' => '1')); ?>
<?php while($top_query2->have_posts()) : $top_query2->the_post();$do_not_duplicate = $post->ID; ?>
<div class="cat-item">
<h3 title="<?php the_title(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?phpthe_title(); ?>">
<?php $suchwort = get_post_custom_values('Beitrags-Title'); ?>
<?phpif(!(empty($suchwort))) { ?>
<?php echo $suchwort[0]; ?>
<?php } ?>
</a></h3>
<?php the_excerpt(); ?>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
Alles anzeigen
[/FONT]