Support

Account

Home Forums Front-end Issues Field Type "User", only show the posts that the "User" is selected Reply To: Field Type "User", only show the posts that the "User" is selected

  • Hi @sbrenner7

    The fact that your user field is a multi-select is a large factor which will effect the code.

    If the field was a sinlgle select, you could perform a simple meta_name / meta_query lookup, but because it is now saved as a serialized array, you will need to allow for this in the meta_query param.

    Please look over example 3 on this page:
    http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/

    It should how you can find posts based on a value, which has been selected by a custom field which saves it’s data as an array.

    Perhaps you can post your code too.

    Thanks
    E