WPIntell

Source evidence

renderFunction not working

Swiftype Site Search Plugin for WordPress · support · 2014-09-10T17:54:00+00:00

mixedsentiment
mediumseverity
0.79relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

3 / 22 rows with source links

13.6% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

19 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Daniel Rodrigues resolved
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-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

Comments

1 shown
qhoxie 2014-11-14T18:13:00+00:00

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