Forums Forums Search & Filter Pro Displaying Shortcodes Inside Search Results w/ Infinite Scroll

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #102119

    Hi, I have been trying to find the answer, but searching the forum for anything containing “shortcodes” brings up all the posts about displaying the search results via search-filter’s shortcodes.

    In my case, I am using infinite scroll, and my search results contain shortcodes inside them, for various functionality unrelated to search-filter. The first set of search-filter results process the shortcodes properly but when the infinite scroll pagination brings in a new set of posts when user scrolls down, it shows my shortcodes in their raw form (eg. [define olá/hello]) instead of processing them like would normally happen.

    Is it possible to get this working without having to disable ajax/infinite scroll?

    Thanks in advance for your help,

    Joel

    Trevor
    #102132

    It would depend on how you are displaying the results. What Display Result method are you using? If you are using any theme templates, the the output of the post will probably need to be inside a do_shortcode function, like this:

    echo do_shortcode(get_post_field('post_content', $postid));

    Or whatever the template or your theme uses to echo the content. Be aware that some plugins (like Visual Composer) use javascript to process shortcodes, and that is a whole new can of worms.

Viewing 2 posts - 1 through 2 (of 2 total)