FacetWP Load More – support the layout builder

mgibbs189

{{gist file=”example.js” lang=”javascript”}}
<script>

(function($) {
FWP.hooks.addFilter(‘facetwp/template_html’, function(resp, params) {
if (FWP.is_load_more && 0 < $(‘.fwpl-layout’).length) {
FWP.is_load_more = false;
var html = $(params.html).html();
$(‘.fwpl-layout’).append(html);
return true;
}
return resp;
}, 8);
})(jQuery);

</script>
{{/gist}}