• Resolved chpmn

    (@chpmn)


    So, How do I list 2 posts from category 1, 9 and 15 on the home page?

    and,

    list all posts from category 8 and 10 on the about us page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter chpmn

    (@chpmn)

    I could really use some help here.

    The current method I use is to exclude categories on the index/home page and posting on other pages doesn’t even work.

    Thread Starter chpmn

    (@chpmn)

    With the help of a friend we figured out how to do this.

    Idea: X category X posts in a DIV

    <?php
    $query_lt = "category_name='community' & showposts=2";
    
    query_posts($query_lt); ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="post">
    <h3><a class="h3a" href="<?php the_permalink() ?>"><?php the_title(); ?></a><br />--<?php echo get_the_author() ?></h3>
    <div class="type"><?php the_time('M j, Y G:i'); ?> - <a href="<?php the_permalink() ?>#commenting" rel="tag"><?php comments_number('0 Comments','1 Comment','% Comments'); ?></a></div>
    <?php the_excerpt('Continue...'); ?>
    </div>
    <?php endwhile; ?>
    
      </div>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I list specific posts?’ is closed to new replies.