Auf http://www.Alles2null.de habe ich auf der Home insgesamt 5 verschiedene Bereiche, auf denen neue Beiträge angezeigt werden. Oben ganz normal alle (das will ich ändern) und weiter unten die neuesten Beiträge aus 4 verschiedenen Kategorien.
Nun wünsche ich mir, dass die Beiträge aus den Kategorien X, Y, Z und A eben nicht mehr oben auftauchen. Sonst hätte ich einzelne Beiträge ja doppelt.
Zum besseren Verständnis ein bisschen Code zum Forschen:
PHP
<?php include (TEMPLATEPATH . '/options.php'); ?>
<div id="feat-box-wrap">
<div id="feat-box-inner">
<?php include (TEMPLATEPATH . '/strings.php'); ?>
<!-- FEATURED CONTENT START -->
<!-- ADSENSE 468x60 START -->
<div class="gads">
<?php $adsense_01 = get_option('rk_magad1'); echo stripslashes($adsense_01); ?>
</div>
<!-- ADSENSE 468x60 END -->
<div id="content">
<div id="content-post">
<div id="post-entry">
<?php if (have_posts()) : ?>
<?php
//insert your category name
$my_query = new WP_Query('showposts=5');
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID;
$the_post_ids = get_the_ID();
?>
<div class="post-meta" id="post-<?php the_ID(); ?>">
<div class="post-meta-top">
<div class="calendar">
<span class="day"><?php the_time('j'); ?></span>
<span class="month"><?php the_time('M'); ?></span>
</div><!-- CALENDAR END -->
<div class="post-info">
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
<span class="stats">
<?php the_author_posts_link(); ?> <?php _e('-'); ?> <?php the_time('l, j. F Y') ?> Kategorie: <?php the_category(', ') ?> <?php if(function_exists("the_tags")) : ?><?php the_tags() ?><?php endif; ?> <?php edit_post_link('edit'); ?>
</span>
</div><!-- POST INFO END -->
</div><!-- POST META TOP END -->
<div class="postcontent-alt">
<?php
$values = get_post_custom_values("featured-images");
if (is_array($values)) : ?>
<?php if (file_exists($upload_path . 'timthumb.php')) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo get_settings('home'); ?>/scripts/timthumb.php?src=<?php echo "$values[0]"; ?>&h=100&w=100&zc=1" alt="<?php the_title(); ?>" /></a>
<?php } else { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo "$values[0]"; ?>" alt="<?php the_title(); ?>" width="100" height="100" border="0" /></a>
<?php } ?>
<?php else: ?>
<?php if (file_exists($upload_path . 'timthumb.php')) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo get_settings('home'); ?>/scripts/timthumb.php?src=<?php dez_get_images($the_post_id = $the_post_ids); ?>&h=100&w=100&zc=1" alt="<?php the_title(); ?>" /></a>
<?php } else { ?>
<img src="<?php dez_get_images($the_post_id = $the_post_ids); ?> " alt="<?php the_title(); ?>" width="100" height="100" border="0" />
<?php } ?>
<?php endif; ?>
<?php the_excerpt_long(); ?>
</div>
<!-- POST CONTENT END -->
<?php include (TEMPLATEPATH . '/social.php'); ?>
</div><!-- POST META END -->
<?php endwhile; ?>
<?php endif; ?>
</div><!-- POST-ENTRY END -->
</div><!-- CONTENT POST END -->
</div><!-- CONTENT END -->
<div id="category-box-wrap">
<div id="category-box-inner">
<!-- ADSENSE 468x60 START -->
<div class="gads">
<?php echo adrotate_banner('6'); ?>
</div>
<!-- ADSENSE 468x60 END -->
<div class="cat-box-block">
<div class="cat-box">
<div class="cat-head">
<h2>Neues zum Thema <?php echo stripslashes($rk_blockcat1); ?></h2><span></span>
</div><!-- CAT HEAD END -->
<div class="cat-post">
<?php $my_query = new WP_Query('category_name='. $rk_blockcat1 . '&' . 'offset=' . '&' . 'showposts='. $rk_blocksum1);
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID;
$the_post_ids = get_the_ID();
?>
<div class="cat-post-left">
<?php
$values = get_post_custom_values("featured-images");
if (is_array($values)) : ?>
<?php if (file_exists($upload_path . 'timthumb.php')) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo get_settings('home'); ?>/scripts/timthumb.php?src=<?php echo "$values[0]"; ?>&h=100&w=100&zc=1" alt="<?php the_title(); ?>" /></a>
<?php } else { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo "$values[0]"; ?>" alt="<?php the_title(); ?>" width="100" height="100" border="0" /></a>
<?php } ?>
<?php else: ?>
<?php if (file_exists($upload_path . 'timthumb.php')) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo get_settings('home'); ?>/scripts/timthumb.php?src=<?php dez_get_images($the_post_id = $the_post_ids); ?>&h=100&w=100&zc=1" alt="<?php the_title(); ?>" /></a>
<?php } else { ?>
<img src="<?php dez_get_images($the_post_id = $the_post_ids); ?> " alt="<?php the_title(); ?>" width="100" height="100" border="0" />
<?php } ?>
<?php endif; ?>
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
<span class="cat-date"><?php the_time('j. F Y') ?></span>
<p><?php the_excerpt_feature(); ?></p>
</div><!-- CAT POST LEFT END -->
<?php endwhile;?>
</div><!-- CAT POST END -->
</div><!-- CAT BOX END -->
<div class="cat-box">
<div class="cat-head">
<h2>Neues zum Thema <?php echo stripslashes($rk_blockcat2); ?></h2><span></span>
</div><!-- CAT HEAD END -->
<div class="cat-post">
<?php $my_query = new WP_Query('category_name='. $rk_blockcat2 . '&' . 'offset=' . '&' . 'showposts='. $rk_blocksum2);
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID;
$the_post_ids = get_the_ID();
?>
<div class="cat-post-left">
<?php
$values = get_post_custom_values("featured-images");
if (is_array($values)) : ?>
<?php if (file_exists($upload_path . 'timthumb.php')) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo get_settings('home'); ?>/scripts/timthumb.php?src=<?php echo "$values[0]"; ?>&h=100&w=100&zc=1" alt="<?php the_title(); ?>" /></a>
<?php } else { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo "$values[0]"; ?>" alt="<?php the_title(); ?>" width="100" height="100" border="0" /></a>
<?php } ?>
<?php else: ?>
<?php if (file_exists($upload_path . 'timthumb.php')) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo get_settings('home'); ?>/scripts/timthumb.php?src=<?php dez_get_images($the_post_id = $the_post_ids); ?>&h=100&w=100&zc=1" alt="<?php the_title(); ?>" /></a>
<?php } else { ?>
<img src="<?php dez_get_images($the_post_id = $the_post_ids); ?> " alt="<?php the_title(); ?>" width="100" height="100" border="0" />
<?php } ?>
<?php endif; ?>
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
<span class="cat-date"><?php the_time('j. F Y') ?></span>
<p><?php the_excerpt_feature(); ?></p>
</div><!-- CAT POST LEFT END -->
<?php endwhile;?>
</div><!-- CAT POST END -->
</div><!-- CAT BOX END -->
<div class="clearfix"></div>
</div><!-- CAT BOX BLOCK 01 END -->
<div class="cat-box-block">
<div class="cat-box">
<div class="cat-head">
<h2>Neues zum Thema <?php echo stripslashes($rk_blockcat3); ?></h2><span></span>
</div><!-- CAT HEAD END -->
<div class="cat-post">
<?php $my_query = new WP_Query('category_name='. $rk_blockcat3 . '&' . 'offset=' . '&' . 'showposts='. $rk_blocksum3);
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID;
$the_post_ids = get_the_ID();
?>
<div class="cat-post-left">
<?php
$values = get_post_custom_values("featured-images");
if (is_array($values)) : ?>
<?php if (file_exists($upload_path . 'timthumb.php')) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo get_settings('home'); ?>/scripts/timthumb.php?src=<?php echo "$values[0]"; ?>&h=100&w=100&zc=1" alt="<?php the_title(); ?>" /></a>
<?php } else { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo "$values[0]"; ?>" alt="<?php the_title(); ?>" width="100" height="100" border="0" /></a>
<?php } ?>
<?php else: ?>
<?php if (file_exists($upload_path . 'timthumb.php')) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo get_settings('home'); ?>/scripts/timthumb.php?src=<?php dez_get_images($the_post_id = $the_post_ids); ?>&h=100&w=100&zc=1" alt="<?php the_title(); ?>" /></a>
<?php } else { ?>
<img src="<?php dez_get_images($the_post_id = $the_post_ids); ?> " alt="<?php the_title(); ?>" width="100" height="100" border="0" />
<?php } ?>
<?php endif; ?>
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
<span class="cat-date"><?php the_time('j. F Y') ?></span>
<p><?php the_excerpt_feature(); ?></p>
</div><!-- CAT POST LEFT END -->
<?php endwhile;?>
</div><!-- CAT POST END -->
</div><!-- CAT BOX END -->
Alles anzeigen
Ich habe hier schon ein weilchen geforscht und recherchiert und auch getestet. Leider habe ich nichts gefunden, was mir bei meinem Theme helfen könnte, somit würde ich mich sehr über Hilfe freuen.