Front page category issues
-
i want to call only two categories to the main page but i want them to be separated. its hard to describe and the site isn’t live but i’ll try my best.
the first category has an id of 4 and the second is an id of 3.
the site needs to look something like this:
—————–– Newest post from category 4 in full
– Just the title of the next post in cat 4
– Just the title of the next next post in cat 4
– Just the title of the next next next post in cat 4– Newest post from category 3 in full
– Second newest post from category 3 in full
– Third newest post from category 3 in full
so on and so forth.—————–
i have accomplished the first part of this (category 4 posts are showing correctly) by stylizing a front.php and setting it as the main page. (i am also using the ACE plugin the make sure only posts from category 4 show on the main page.)
<div id="container"> <?php if (have_posts()) : ?> <?php query_posts("showposts=1"); ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title() ?>"><?php the_title(); ?></a></h2> <div class="entry"> <?php the_content(); ?> <p class="postmetadata"> Posted on: <strong><?php the_time("l F dS Y") ?>, <?php the_time() ?></strong> and <?php _e('filed under'); ?> <strong><?php the_category(', ') ?></strong><br /> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', ' | ', ''); ?> </p> </div> </div> <?php endwhile; ?> <div class="post"><h2> <?php query_posts("showposts=15&offset=1"); ?> <?php while (have_posts()) : the_post(); ?> </h2> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title() ?>"><?php the_title(); ?></a></h2> <?php endwhile; ?> <?php else : ?> <div class="post"> <h2><?php_e('Not Found') ?></h2> </div> <?php endif; ?> </div>now i don’t know what to add to make my page call only posts from category 3 below the code of what i already have.
any help would be appreciated. hope that makes sense.
The topic ‘Front page category issues’ is closed to new replies.