How to use ACF Date Field from Custom Post

Home Forums Product Support Forums Ajax Search Pro for WordPress Support How to use ACF Date Field from Custom Post

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23188
    bkkalia
    bkkalia
    Participant

    We are listing Govt work jobs on our website and every work has Different last/expiry date.
    I have a ACF date field which is associated with a CPT. Every post have different date (Expity Date of Job).
    I wish to show only those results whose date is either Today or In Future Than that ACF Date in the the post.
    I able to find Exact Dates or relative dates or Relative Dates in AJAX PRO Search but did not found any option to pick ACF Date.
    Is this possible with Ajax Search Pro ? if yes, guide me how.

    #23189
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Yes, this should be possible, via using a custom field filter, as ACF fields are post meta fields. For all the details about the custom field filters you can find in this documentation.

    In your case, it should look something like this:
    1. Creating the custom field filter: https://i.imgur.com/qw6MCUg.png
    Make sure that the field name and the type is correct, according to your case.
    2. You can hide the front-end options, and the filter will be still active, but invisible: https://i.imgur.com/3M1l691.png

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.