FacetWP widget labels tonen
Voeg de onderstaande code toe aan de functions.php van je child-theme of maak gebruik van een plugin als bijvoorbeeld code-snippets.
/** Labels facetwp **/ function fwp_add_facet_labels() { ?> <script> (function($) { $(document).on('facetwp-loaded', function() { $('.facetwp-facet').each(function() { var$facet = $(this); varfacet_name = $facet.attr('data-name'); varfacet_label = FWP.settings.labels[facet_name]; if ($facet.closest('.facet-wrap').length < 1 && $facet.closest('.facetwp-flyout').length < 1) { $facet.wrap('<div class="facet-wrap"></div>'); $facet.before('<h3 class="facet-label">' + facet_label + '</h3>'); } }); }); })(jQuery); </script> <?php } add_action( 'wp_head', 'fwp_add_facet_labels', 100 );