Forums › Forums › Search & Filter Pro › Featured Image gone when I select 2 categories
Tagged: featured image missing
- This topic has 6 replies, 2 voices, and was last updated 5 years, 1 month ago by Trevor.
-
Anonymous(Private) November 19, 2019 at 10:42 pm #227083
I have my filter working with checkboxes of the categories on the side on the blog page and when I select 1 category it filters just fine, but when I select a second category all of the featured images are gone and are just big blank spaces with the title and the meta description shows all the visual composer code instead of the meta description.
Anonymous(Private) November 20, 2019 at 9:56 pm #227195Yes here is the link: https://acronisscsstg.wpengine.com/blog/
Trevor(Private) November 21, 2019 at 9:02 pm #227280The solution might necessitate some experimentation. It is necessary to initialize Page Builders shortcodes again after an Ajax call (so, if you turned off Ajax in our form, the issue is likely to go away).
Try adding this script to the page (you can add it to the start of the results.php file, outside of a php block:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); $(.search-filter-results).vc_js(); }); }(jQuery));</script>
I am unsure if this will work. If it does not, I may need to ask our developer to take a look.
Trevor(Private) November 22, 2019 at 7:02 am #227308I will explain what the issue is. You are using WPBakery Page Builder to create the content for the pages/posts that you are searching. In turn, that plugin uses their own shortcodes to format and structure the content you make. If you look at the search results when the issue happens, you can see them.
The issue arises because WPBakery decided (for reasons of speed) not to use normal WordPress shortcodes to do this. Instead, it uses JavaScript to process those shortcodes. The WPBakery support forums have discussed this issue (that you face) for many years, but the plugin authors have not provided a definitive answer as to how to get around this. That they have not suggests that it is not easy to do.
I think, for now, the only solution is to disable Ajax in the form.
-
AuthorPosts