• Resolved wvdploeg

    (@wvdploeg)


    I’m working on a pods template, but I can’t get something done.

    The situation

    I have a pods, let’s say ‘profile’

    In the profile there is a field with multiple other pods, lets say ‘attachment’ is the name of the pods and ‘attached_files’ the field in profile.

    Attachment has a field ‘file_type’.

    When I want to display only fields of ‘field_type’ I tried

    (current pots is ‘profile)

    [pods template=”my_template” where=”attached_files.file_type=’Image’]

    The template shows, but the ‘where’ selection is not done, it shows all attached_files and not just ‘Image’.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    You can’t do everything with Pods Templates; they aren’t intended as PHP Theme Template replacements. Trying to only show specific attachments is one of those, trying to sort and filter on only some related items is another.

    Also, you should be getting an error message in that where clause because relationship field of attached_files connecting to meta field of file_type would need a suffix of meta_value.

    In addition, the where clause has no context in that shortcode. It’s going to assume the current post and bypass the where.

Viewing 1 replies (of 1 total)
  • The topic ‘Problem doing a selection on output’ is closed to new replies.