WordPress.org

Ready to get started?Download WordPress

Forums

Post-Specific Page (4 posts)

  1. wraithstk
    Member
    Posted 4 years ago #

    Is there any way that you could make a page for a specific category of posts? So on this page all posts with that category would be displayed.

  2. dragonsjaw
    Member
    Posted 4 years ago #

    A froum
    thread
    that discusses this.

    In its most simplest form:

    1. He creates a template called "freebies.php"

    2. In that template he has a loop running to only show posts that have a category of "freebies"

    3. In the WP backend he creates a new page called "Freebies" and in the right sidebar selects the Freebies template that he created in step #1

    Now when you click on the Freebies page it will list all posts that have a category of "freebies", but it is not a category page (ie, not using category.php or archive.php).

    Does that make sense?

    ?php query_posts('cat=5'); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
       <?php the_content(); ?>
    <?php endwhile; endif; ?>

    Just need to find out what the category id# is!

    hope that's what you were looking for.

  3. wraithstk
    Member
    Posted 4 years ago #

    How do you find out what the category id is?

  4. MichaelH
    Member
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic