• Hi,
    I have a website with posts for multiple events and organizations (both
    standard post type). Assigned to the Posts are Categories such as the
    Parent Category “Events” or parent category “Organizations”. Child
    categories are something like: Music, Arts and so on. For both
    organizations and Events there are also child categories that show the
    city where organizations are or events take place.

    Now I would like to output four separate lists of content:

    1. A list of all cities where Events take place. When I click on
    Music-Event all assigned posts are shown (but without posts that are
    organizations).
    2. A list of all cities where there are organzations. When I click on
    Music-Organization all assigned posts are shown (but without posts that
    are events).
    3. A list of all categories of types of Events. When I click on
    Music-Event all assigned posts are shown (but without posts that are
    organizations).
    4. A list of all categories where of organzations – When I click on
    Music-Organization all assigned posts are shown (but without posts that
    are events).

    This seems to be quite complicated with wordpress. Does anyone here know which addon I can choose in order to do that? I tried with “Custom Content Shortcode” but it always also shows other child-categories from other parent-categories. PODS I tried but can’t use it because I cannot use custom post types….

    Can anyone give me a hint? That would be great!
    best regards desputin

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Yes, with the default interface, getting lists the way you want is difficult. I’m unfamiliar with any plugins that would work the way you want. This does not mean they don’t exist.

    Getting the results you want is not too difficult with custom code. Assuming one thinks custom code is “not too difficult”. Many would disagree. Any posts query can be altered through the “pre_get_posts” action hook. Code can look for a Music-Event query, and when it’s seen, set the query var “category__not_in” to the ID for the organizations category. The result will be as you desire in item 1. Similar logic for the rest.

    If coding is not your thing, you can get experienced help at jobs.wordpress.net or jetpack.pro . It shouldn’t be too expensive if the required code is relatively simple.

Viewing 1 replies (of 1 total)
  • The topic ‘Output posts and categories by tags or child categories’ is closed to new replies.