Search reuslts returning code

When using the search facilityon the site it returns code such as the below. This happened when we search for ‘home’ on the website phildaysports.co.uk

var lsjQuery = jQuery;lsjQuery(document).ready(function() { if(typeof lsjQuery.fn.layerSlider == “undefined”) { if( window._layerSlider && window._layerSlider.showNotice) { window._layerSlider.showNotice(‘layerslider_1’,‘jquery’); } } else { lsjQuery("#layerslider_1").layerSlider({sliderVersion: ‘6.7.6’, type: ‘fullwidth’, responsiveUnder: … Read More

Hi @Freshnous,

Thanks for reaching out.

Wordpress generates plain text excerpt from the actual content, and it’s by stripping out HTML elements, shortcodes, and similar. Which then removes the <script></script> resulted to that. I recommend adding excerpt manually to the affected posts/pages.

Please check these

  1. https://www.wpbeginner.com/plugins/add-excerpts-to-your-pages-in-wordpress/ (for enabling excerpt for page, post has it active by default). Just this one and skip the other parts.

  1. https://www.wpbeginner.com/plugins/how-to-customize-wordpress-excerpts-no-coding-required/ (for adding excerpts manually). But skip the second step.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.