renderFunction not working
-
Hi,
i’m trying to customize the results shown in the autocomplete.In my
functions.php
i have the following code:function swiftype_javascript_config() { ?> <script type="text/javascript"> var customRenderFunction = function(document_type, item) { return '<p class="title">test' + item['title'] + 'test</p>'; }; var swiftypeConfig = { renderFunction: customRenderFunction }; </script> <?php } add_action('wp_head', 'swiftype_javascript_config');
I wrote this code by reading this documents:
https://swiftype.com/documentation/tutorials/customizing_wordpress_search
https://github.com/swiftype/swiftype-autocomplete-jqueryThis doenst seem to work. What am i missing here?
Thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘renderFunction not working’ is closed to new replies.