WordPress.org

Ready to get started?Download WordPress

Forums

PostsInCategory plugin req. - or new way of listing posts (2 posts)

  1. magslhalliday
    Member
    Posted 7 years ago #

    I want to save my non-geeky editor time and effort on our ezine.

    Each post in each 'issue' of the ezine is put in a category to indicate the issue (we're just doing 'issue 02' for example, so I have a dozen posts in that category). I want to create a normal post to be our static front page, which contains within it the list of the posts in the same issue category. Ideally the list includes the title of the post and all info up until the <!--more--> tag. That way, the non-geeky editor writes her brief intros to each post on the posts themselves and WP automatically includes them in the editorial overview post. It also saves me time cutting'n'pasting links to all the posts!

    The 'PostsInCategory' plugin listed in the codex looks ideal, but every link I've found points to a dead site (even if I use google or technorati). The other plugin listed in the codex produced an error and didn't look to be as suited for what I need.

    Can anyone point me to where I can download the 'PostsInCategory' plugin, or suggest an alternative solution?

  2. meigwil
    Member
    Posted 7 years ago #

    This is one way, but you need to input the category number every time. It will give an unordered list of the posts from the requested cat.

    I'm in the process of writing this to a plugin. I'll try and let you know when.

    Mei

    <ul>
    <?php $posts = get_posts('category=XX'); ?>
    
    <?php if( $posts ) : ?>
    
    <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
    
    <li><a href="<?php the_permalink() ?>" title="Link to <?php the_title(); ?>"><?php the_title(); ?></a></li>
    
    <?php endforeach; ?>
    
    <?php endif; ?>
    </ul>

Topic Closed

This topic has been closed to new replies.

About this Topic