WordPress.org

Ready to get started?Download WordPress

Forums

Show posts under specific category only (4 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    I have three parents categories - 1, 3, 18
    under 3 i have about 10 sub-categories, under 1 is none
    under 18 i have about 10 sub-categories..
    here's what I want to do,
    I want to show only categories 1, and 3 on main page
    but on another page, i only want to show categories 18
    i tried editing index.php of main and included $cat="1,3,-18" which did the job but shows entire posts under those two categories, I only want it to show maximum of 4 categories. (half success) is there anyway to limit the number of posts ?
    then I tried editing index.php of other page, and put $cat="-1,-3,18" which did nothing, then tried $cat="-1,-3", did nothing either, $cat="18", works but shows entire posts again.
    how do i limit number of posts shown ? I can limit them without $cat=" " line, but can't with it.
    Help!
    Thank you,
    pat

  2. Anonymous
    Unregistered
    Posted 10 years ago #

    oops one more thing,
    for the other page, when I put $cat=18, since it's parent category it shows all posts under that categories, is there anyway to show just the posts under categories 18? and no posts from sub categories?
    thank you!!

  3. SuperSpiker
    Member
    Posted 10 years ago #

  4. danes75
    Member
    Posted 10 years ago #

    hmm... i'm having a problem implementing the ShowOneCategory. I've followed the instructions, and it doesn't work :-\

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.