Yes it has to be page, because it has to have a unique sidebar menu - which is a widget whit widget logic like: is_page('XX'); Every few pages have other side menu. (widget logic is a plugin that lets me put different widgets on a different pages)
And this code:
<?php
$categories = get_categories();
foreach ($categories as $cat) : ?>
<div class="wrap_cat">
<?php
// get most recent post in cat
query_posts('posts_per_page=1&cat='.$cat->cat_ID);
if (have_posts()) : while (have_posts()) : the_post();
?>
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php the_content('continue reading...'); ?>
<?php endwhile; endif; wp_reset_query();
// get 4 most recent posts in cat offset by 1
query_posts('posts_per_page=4&offset=1&cat='.$cat->cat_ID);
if (have_posts()) : ?>
<ul class="moreposts">
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul> <!-- .moreposts -->
<?php endif; wp_reset_query();?>
</div> <!-- .wrap_cat -->
<?php endforeach; ?>
This code made a mess out of my page(in fact any code - any <?php mark)...
It displays literally this:
$categories = get_categories();
foreach ($categories as $cat) : ?>
// get most recent post in cat
query_posts('posts_per_page=1&cat='.$cat->cat_ID);
if (have_posts()) : while (have_posts()) : the_post();
?>
...and than it lists 4 latest pages i created - instead of posts...
For me this is to hard to understand...