Hallo Forum,
ich blicke nicht mehr ganz durch :confused:
Ich habe eine Seite mit 2 Spalten, in der linken zeigt es mir immer die aktuellsten Artikel an, in der rechten sollte jeweils eine statische Seite je nach Kategorie angezeigt werden.
Wird dem Artikel z.B. die Kategorie "max" mit der id 1 zugewiesen, soll rechts die statische Seite mit der id 1 erscheinen, wird "moritz" mit der id 2 zugewiesen, soll die statische Seite mit der id 2 erscheinen usw.
Hier mein Code bisher:
PHP
<div id="sidebar1">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<div class="storycontent">
<?php the_content(__('(more...)')); ?>
</div>
<div class="meta"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> — <?php _e("Filed under:"); ?> <?php the_category(',') ?> — <?php the_tags(__('Tags: '), ', ', ' — '); ?> <?php edit_post_link(__('Edit This')); ?></div>
</div>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</div><!-- end #sidebar1 -->
<div id="sidebar2">
<?php if (query_posts('cat=1') ) {
query_posts('page_id=1');
} elseif (query_posts('cat=2') ) {
query_posts('page_id=2');
} ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<?php wp_reset_query();?>
</div><!-- end #sidebar2 -->
Alles anzeigen