1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I call a search of my forum’s posts from wordpress?

Discussion in 'Enhanced Search Support' started by Matt777, Jan 4, 2013.

  1. Matt777

    Matt777 Member

    I want to put a search box on my wordpress blog, a search box that searches the xenforo forum posts.

    A typical query looks like this:
    I understand that q= is for the search term.

    But there's also a strange 5 digit number in the url query. I suppose that’s the ID for that search, but I’m not sure. (P.S. I’m using Enhanced Search)

    So if I want to submit a search query from wordpress, what do I use for this number, or do I ignore it or what? (n)
  2. Slavik

    Slavik XenForo Moderator Staff Member

    Matt777 likes this.
  3. Matt777

    Matt777 Member

    Thank you Slavik for the very prompt reply. (y) Just to clarify what you said, the "curl -XGET" is called from PHP, and then I could display the search results within wordpress itself, if I can figure out how to parse the returned results?

    My orginal ideas was to use an HTML form submission, like this
    <form action="http://www.mywebsite.com/forum/search/65355/?q=elephant&o=date">
    ... and have it go to the Xenforo search results. I just didn't know what to do with that 65355 number... but your way sounds better, if I'm understanding you correctly?
  4. Slavik

    Slavik XenForo Moderator Staff Member

    The number in XenForo is just how many searches have been done. If you do several searches in a row youll see each time they increase by 1 ;)

    Heres some additional documentation which explains it in better detail: http://www.elasticsearch.org/guide/reference/api/search/uri-request.html

Share This Page