WordPress.org

Ready to get started?Download WordPress

Forums

Show Only Selected Catagory Posts (Pretty Please) (3 posts)

  1. atomictoyguy
    Member
    Posted 7 years ago #

    Problem: When I select a parent category it is showing the posts of all of the children categories listed under it.

    I would like to see this perform like so: If you select a parent category it will only show the posts of that category. So if there are posts in children categories they will be hidden until you select the appropriate category.

    I have done a ton of searching and have not turned up a result that works yet. Probably hiding under a rock I haven't looked under yet, but I am tired of searching and being redirected to the same solution that doesn't work over and over again.

    I have tried the solution from tikimaticdotcom

    But I have run into problems with his solution.
    A: The version of WordPress that I am running doesn't have the line "get_category_children" any where in classes.php
    B: There is no such file as template-functions-category.php in my version of WordPress.

    So I read through the comments and saw that "mcjim" thought he found a solution. I tried commenting out the line:
    $whichcat .= get_category_children($q['cat'], '', ', ');
    in query.php and this didn't work either.

    So I beg and plead with all of you wizards of code can you find a solution to this perplexing problem?

    Site: http://www.guardiansofmight.net
    WP Ver: 2.1.2
    Theme: Black Photo
    Plugins: Fold Category List, Limit Categories, Page Links To, Role Manager, and WPG2

  2. Alex Cragg
    Member
    Posted 7 years ago #

    i take it you tried here?
    http://codex.wordpress.org/Category_Templates#Show_the_Category_Posts

    maybe you could put something in that says, if the category is the title, exclude children of it....
    but in php.....dont spose thats much help really!

  3. atomictoyguy
    Member
    Posted 7 years ago #

    OK I Guess I should have prefaced this by saying that I am not a coder. LOL So I tried briefly making heads or tails about the page you referred me to. I'll try reading the whole article when I get home to see if I can turn it from Greek to English in my head.

    If some one out there would be so gracious as to spell out what code I need to change, add or comment out in the category.php file that would be greatly appreciated.

    That is if the category.php file is even capable of performing the task at hand.

Topic Closed

This topic has been closed to new replies.

About this Topic