Conversation
supportHi, 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-jquery This doenst seem to work. What am i missing here? Thanks in advance! https://wordpress.org/plugins/swiftype-search/
Hello, Have you verified that the javascript is being included in your template? If you have a link to a live site, that would help with troubleshooting. Best, Quin
Hello, Have you verified that the javascript is being included in your template? If you have a link to a live site, that would help with troubleshooting. Best, Quin