Plugin Author
berkux
(@berkux)
Hi timothyong,
see http://wptest.kux.de/timothyong/
This is done with the pro-version and this template:
[jsoncontentimporterpro url=”https://data.gov.sg/api/action/datastore_search?resource_id=d23b9636-5812-4b33-951e-b209de710dd5″ parser=”twig”]
total: {{result.total}} <hr>
{% for rec in result.records %}
{% if loop.index <= 10 %}
{{loop.index}} town: {{rec.town}}: max_selling_price: {{rec.max_selling_price}}
<hr>
{% endif %}
{% endfor %}<hr>
[/jsoncontentimporterpro]
Searching:
So it would be good if the search word is ‘Punggol’, its following results should be shown as above.
How is the API working with that?
Best wishes
Bernhard
Thanks so much for your reply.
Can it only be done during using the pro version?
Plugin Author
berkux
(@berkux)
Hi,
try with the freec version (no of item is not available there, display the first 10 items):
[jsoncontentimporter url=”https://data.gov.sg/api/action/datastore_search?resource_id=d23b9636-5812-4b33-951e-b209de710dd5″ basenode=”result”]
total: {total} <hr>
{subloop-array:records:10}
town: {records.town}: max_selling_price: {records.max_selling_price}
{/subloop-array:records}
[/jsoncontentimporter]
Hey, i would try that out. Thanks so much for your help though. Do you know of any methods that can integrate a search into your plugin? For example, the user can search for something and the result can be displayed to how your plugin works?
Thanks.
Plugin Author
berkux
(@berkux)
Do you know of any methods that can integrate a search into your plugin? For example, the user can search for something and the result can be displayed to how your plugin works?
The PRO-Version can pass GET-Variables from the search to the API.
So requesting wordpresswebsite…?search=timo saks api?search=timo and the api gives the timo-result. Then the plugin displays the results.
Or: see http://www.kux.de/projekte/die-naechsten-digitaltermine-muenchen/
There data is on the page and search is done via jQuery.