Tagged: search
Hi,
A few sites we are currently hosting when doing a search short codes are appearing in the results for the layout editor tags etc.
Thanks,
DM
Hey DMWeb,
Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
Rikard
See login below
Thanks,
DM
Hi,
Try using the solution given in this thread: https://kriesi.at/support/topic/search-results-preview-showing-shortcode/#post-423784
Hope this helps.
Best regards,
Nikko
Hi,
That did not seem to help. Did not change anything.
I tracked it down to the loop-search.php file. I do not use the excerpt so I just commented out the code below and it started working enough:
$excerpt = trim(get_the_excerpt());
/*if(!empty($excerpt))
{
the_excerpt();
}
else
{*/
$excerpt = strip_shortcodes( get_the_content() );
$excerpt = apply_filters('the_excerpt', $excerpt);
$excerpt = str_replace(']]>', ']]>', $excerpt);
echo $excerpt;
//}
Thanks,
DM
Hi,
Glad that you fixed it.
Cheers!
Nikko