• Hi there,

    I’m using a combination of the plugins Custom Fields Template and Custom Fields Taxonomies. I use the first one to define CF with each entry and the latter one to query posts using these custom fields.

    One problem I’m running into is that when I call custom fields as a cloud it shows all custom fields in the database when I call it outside a loop OR just the ones for a specific entry when called inside the loop.

    My question: is it possible to show only available and relevant custom fields after doing a query?

    Example:
    for the label Fruit I have the custom fields Apples, Oranges, Bananas and Lemons
    for the label Colour I have the custom fields Green, Red, Yellow, Orange

    Now I would like to query for Apples which shows all posts with the value Apples for label Fruit. At top of these results I want a cloud with all custom fields with Colour related to the current query. In the Apple posts there are red and green apples, NOT yellow and orange. When I call the custom fields for label Colour though I still get Orange and Yellow in the list which don’t make any sense.

    Is there a way for solving this issue? The reason for this is I want to use custom fields for filtering displayed posts. i.e. Fruit > Apples > Red which only shows posts wit red apples.

    I’ve been puzzling for days now, tried dozens of plugins but just can’t figure this out.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Only show relevant custom fields for a query’ is closed to new replies.