• dhkeller

    (@dhkeller)


    Still looking for a solution to the problem described earlier: https://www.ads-software.com/support/topic.php?id=24473

    I’d like to show all of the posts from a given category on each catergory page, but I don’t want to display posts from subcategories. How do I stop the children from displaying?

    Thought I had an answer, but while it achieved my goal on the category views, it resulted in empty pages for all searches and individual post pages. Oops.

    Does anyone have a better solution?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter dhkeller

    (@dhkeller)

    bump …. any ideas?

    See if this post by Andrew Hall and/or my comment below it help. That was for WP1.2 so maybe the line numbers don’t match. If you can’t figure out where to find that, holler and I’ll dig into the code ??

    Oh, eh, sorry… you figured out that it doesn’t work. Do you know why it doesn’t?

    Actually, never mind ?? I’m trying something out right now. The places where you need to comment out things have moved a little.

    OK now. Are you a brave spirit? ?? This is for the latest, 1.5.1.1., probably applies for 1.5.1. too

    1) Make a backup of the file classes.php found in wp-includes
    2) Comment out lines 393, 396, 420; to spot them, look for “Category stuff” + “Category stuff for nice URIs” and comment out (add two forward slashes at the beginning of the line) the lines starting with $whichcat .= get_category_children – there are 3
    3) upload the new classes.php

    That should do it.

    I love you for that ?? .. thx, works perfectly

    My Blog

    @minna, an all

    for wp2.0 comment lines:
    465-468
    and
    498

    an the world is fine

    I had this problem; I think this little plugin will solve it quite for WP 2.0.x without editing source:

    No SubCats plugin

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘One Category’s Posts only (NOT subcategory posts)’ is closed to new replies.