Created
February 11, 2021 19:09
-
-
Save mgibbs189/d851d7045d692180d2fe55a1ae8b120e to your computer and use it in GitHub Desktop.
FacetWP - change flyout layout HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add to your (child) theme's functions.php | |
add_action( 'wp_head', function() { | |
?> | |
<script> | |
(function($) { | |
$(function() { | |
if ('object' != typeof FWP) return; | |
FWP.hooks.addFilter('facetwp/flyout/facet_html', function( facet_html ) { | |
return facet_html.replace('<h3>{label}</h3>', '<p>{label}</p>'); | |
}); | |
}); | |
})(jQuery); | |
</script> | |
<?php | |
}, 100 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment