• Resolved davidpaulalbert

    (@davidpaulalbert)


    The code samples are pretty clear on how to filter a collection by a particular field value. However, is there a way to do this through a shortcode? For example, if I wanted to only display records where the field “Status” is “Complete” something like,

    [apr_loop filter=”Status|Complete”]

    Obviously I realize this syntax is wrong, just looking to see if there’s a way to do this.

    Also, I’d like to avoid doing this as a Virtual Post filter as I’d like to have a few filtered loops on a page.

Viewing 1 replies (of 1 total)
  • Plugin Author Chester McLaughlin

    (@chetmac)

    There currently is no support for controlling an apr_loop with conditional logic.

    Attempting any sort of non-trivial conditional logic with shortcodes would get ugly fast.

    I suggest using a custom shortcode for the entire loop if you really need conditionals. Alternatively you could use Javascript to filter the visible output of the various loops.

Viewing 1 replies (of 1 total)
  • The topic ‘Filter records via a shortcode’ is closed to new replies.