Forums Forums Search & Filter Pro Post Meta – filter IDs

Tagged: 

  • This topic has 6 replies, 3 voices, and was last updated 7 years ago by Anonymous.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Trevor
    #147033

    Is the data in ACF (ACF or ACF Pro?) fields, if so, what type of field?

    Anonymous
    #147040

    Hello,

    No, they’re created with CMB2 so using WordPress native functionality for post meta. I’m storing an ID of a term within a taxonomy (just stored as text), so need to be able to perform my get_term_meta on output of the list of IDs.

    Steph

    Trevor
    #147173

    The only way I can think to do this is to manually add the values to the form and then add/correct the labels. Like this:

    https://screenshots.firefox.com/aCQ946IoP7OKGsQy/sandfdev.cdnwebservices.net

    Ross Moderator
    #147182

    Hi Steph

    Just to add, you can actually update the labels programmatically:

    https://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/#Filter_Input_Object

    You could use the value of the option to lookup the label, and set that as your label for your option in your field.

    Check the linked github example too for more in depth usage.

    Hope that helps

    Anonymous
    #147192

    Hello,

    Thank you both for your responses.

    Ross, that looks perfect for what I need to do and should solve my problem.

    Thanks,
    Steph

    Anonymous
    #147505

    Hello,

    Just to confirm this solution worked perfectly.

    Thanks again,
    Steph

Viewing 7 posts - 1 through 7 (of 7 total)