return the search results in an array of post ids

Home Forums Product Support Forums Ajax Search Pro for WordPress Support return the search results in an array of post ids

This topic contains 4 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #37489
    apbalice71
    apbalice71
    Participant

    Hi, is it possible to return the search results in an array of post ids? We would like to see if we can use it in the post__in argument of WP_Query.

    #37490
    apbalice71
    apbalice71
    Participant
    You cannot access this content.
    #37500
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Well, you are running a live search there – even if there was a way to get those IDs, the search is not yet started during the page load. You could only fetch the post IDs via front-end javascript, then probably run an asynchronous request to send the IDs as query arguments, fetch the data, and replace the widget.
    I am not sure if I recommend doing this, unless you have a very strong experience with both back-end and front-end coding, or have a good developer of doing that.

    Best,
    Ernest Marcinko

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


    #37512
    apbalice71
    apbalice71
    Participant
    You cannot access this content.
    #37530
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.