Forums › Forums › Search & Filter Pro › Raw Search Data
- This topic has 6 replies, 2 voices, and was last updated 6 years, 5 months ago by
Trevor.
-
Anonymous(Private) September 12, 2018 at 12:50 pm #188191
Hello!
I am trying to integrate Search & Filter Pro with the “Pods – Custom Content Types and Fields” plugin using a custom display method per the instructions at https://searchandfilter.com/documentation/search-results/custom/.
However I cannot seem to attach Search & Filter to the Pods query. Can you advise how the Search & Filter results can be used to pass a parameter to a Pods query, per the function definition at https://pods.io/docs/code/pods/find/
The reason I need to do this is I want to display some custom fields from the Pod in my results, not just the title, permalink, thumbnail, category, tags and date that the standard Search and Filter results page shows.
I tried to do this myself by attempting to view the raw array data of the Search & Filter result. However, all the example codes on https://searchandfilter.com/documentation/accessing-search-data/ return nothing for me even after I’ve changed the search form ID. Can you advise why these lines of code are running without any PHP errors but are returning a blank, even though the page itself is returning a set of standard results (which means the Search and Filter plugin must be working).
Thanks!
Trevor(Private) September 12, 2018 at 12:57 pm #188196You will not be able to pass the data in the way you suggest. are you using our Shortcode Display Results method:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
If so, follow the customising guide there and add extra PHP to show the Pods fields.
Anonymous(Private) September 12, 2018 at 1:13 pm #188204Hello Trevor
Thank you for the prompt reply. I actually already thought of doing what you suggested, but I have not been able to determine the contents of the S&F Pro results array in order to link each item of the query result to the Pod data. Can you tell me how I access the data array for the S&F Pro results?
As I mentioned in my earlier post, I tried to find raw search data using your instructions at https://searchandfilter.com/documentation/accessing-search-data/ but none of these do anything. They don’t cause any errors, but neither do they echo/print/display the information that they are supposed to. They literally generate nothing on the page. Can you advise how I access the search results data in order to be customise my results.php with additional data from the Pod?
Thank you for your assistance.
Anonymous(Private) September 12, 2018 at 1:19 pm #188208Just to clarify with further information regarding the previous post:
* I have entered information for different branches of a company in custom fields of a custom post type.
* Search & Filter displays the title, permalink, thumbnail, category, tags and date for each branch in the search results.
* But I need to show additional data associated with each branch (e.g. address, telephone number etc). So I need to be able to link each S&F result back to the Pod table so I can display that data per result item. I will therefore need the Search & Filter data array in order to create a query to pull further information for each result from the Pods table to display for each branch. -
AuthorPosts