• I’ve been searching for hours now to solve this. The idea is pretty simple but I can’t find out how to do it.

    Categories:

    Cat 1
    – Subcat 1
    – Subcat 2
    Cat 2
    – Subcat 1
    – Subcat 2

    Instead of displaying subcategories in the sidebar I want to display the posts of that category. So it would turn out like:

    Cat 1
    – Post 1
    – Post 2
    Cat 2
    – Post 1
    – Post 2

    It would be great if you could hide all the posts until you actually click the main category.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter mojobobo

    (@mojobobo)

    Great, thanks a lot!

    Some small quirk fixing and it works very well.

    term_id should be cat_ID. According to the plugins I use.

    Sorry.

    term_id >= 2.3.x

    cat_ID <= 2.2.x

    well done Kafkaesqui, that’s code works 100%, but i have a question..

    how to show the category like this:
    Category
    –Subcategory
    Category
    –Subcategory
    Category
    –Subcategory

    not like this

    Category
    Subcategory
    Category
    Subcategory
    Category
    Subcategory

    your code is 100% working but it shows the main and the sub category mix, i want to separate the sub category with this ” — ”

    Please help me i am really confused!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How To Replace Subcategories With Posts in Sidebar?’ is closed to new replies.