@alchymyth
Woooww.... GREAT....SPECTACULAR
Your code is full working....
Thank you very much alchymyth
Now I will not bother again with that code :)
and this is the conclusion of the code :
<?php
wp_reset_query();
$cats = get_categories('');
foreach ($cats as $cat) :
if($cat->category_parent) continue; //this line avoids to show posts of sub categories
$args = array(
'posts_per_page' => 5,
'category_name' => $cat->slug,);
query_posts($args); // reset to original
if (have_posts()) :
echo '<h2>Latest Posts in '.$cat->name.' Category</h2>';
?>
<?php while (have_posts()) : the_post(); ?>
<div>
<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</h2>
</div>
<?php
if ( is_category($vidcat) ) { the_content(); }
else { echo strip_tags(get_the_excerpt(), '<a><strong>'); }
?>
<!-- this area is for the display of your posts the way you want it -->
<!-- i.e. title, exerpt(), etc. -->
<?php endwhile; ?>
<?php else : echo '<h2>No Posts for '.$cat->name.' Category</h2>';?>
<?php endif; wp_reset_query; ?>
<?php endforeach; ?>
Once again thank you very much alchymyth , you are so GREAT ... ;)