WordPress.org

Ready to get started?Download WordPress

Forums

Parsing posts and filtering by category. (5 posts)

  1. 4Him
    Member
    Posted 6 years ago #

    To illustrate my problem, I'm just going to explain what I intend on doing with my site:

    I have a blog, with multiple categories (A, B, and C for this example). I want a separate, somewhat-static front page with three "boxes" for content. In one box, I want to parse the latest post from the blog with the category of A. In the second box, I'd like to do the same thing with category B. And so on.

    So, if I understand how WordPress operates well enough, I think I need 2 plugins. One to parse the latest post, and another to filter that parse by category.

    Any ideas?

    Thanks in advance,

    Kyle

  2. Chris_K
    Member
    Posted 6 years ago #

    Check out the multiple loops section on The_Loop page. I think that would be a good start.

    This tutorial may also be helpful: http://www.cre8d-design.com/blog/2006/03/09/wordpress-tutorial-blog-posts-in-different-columns/

  3. 4Him
    Member
    Posted 6 years ago #

    Trying it now. Thanks for the incredibly quick response!

    I'll let you know if I have success (it's looking like this is exactly what I was looking for though).

  4. sebix
    Member
    Posted 6 years ago #

    Hi 4Him, could you please tell us if you find a solution if yes could you please share with us your solution/source code. Thanks in advance. S

  5. sebix
    Member
    Posted 6 years ago #

    my solution, hope this helps
    <?php $temp_query = $wp_query; ?>
    <?php query_posts('cat=1,15'); ?>
    <?php while(have_posts()) : the_post(); ?>
    <!-- <?php the_title(); ?> -->
    <div class="Box">" title="<?php the_title(); ?>"><?php the_title(); ?><small><?php the_time(' j F Y') ?></small></div>

    <?php endwhile; ?>
    <?php $wp_query = $temp_query; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic