Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Joel Rendall
    #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 Moderator
    #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)

The forum ‘Search & Filter Pro’ is closed to new topics and replies.