WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Template file only showing posts in 1 category and child categories (3 posts)

  1. Norke
    Member
    Posted 5 years ago #

    Hey peeps,

    I have made a category called: Tutorials. In that category I made a few other child-cats ( a la Photoshop, painting, ...)
    I have created the template file "Tutorials", and I would like to display all posts that are labeled with a child category of the Tutorials cat.
    In short: I only want my tutorial posts to show up on the tutorials page.

    I'm sure this is possible, allthough I seem to get lost in the docs quiet often. I hope someone knows how to do this.

    Have a great time.

    Yannick

  2. Norke
    Member
    Posted 5 years ago #

    I tried solving it with:

    <?php $recent = new WP_Query("cat=18&showposts=10"); while($recent->have_posts()) : $recent->the_post();?>

    Allthough, the whole post is on it and only the stuff before the <!--more--> should be displayed. Anybody has an idea?

  3. Norke
    Member
    Posted 5 years ago #

    It's solved, thx anyhow. :)

Topic Closed

This topic has been closed to new replies.

About this Topic