Hi Kriesi-Team,
how to change the separator of the sorting options from a slash to a hyphen in the masonry element?
Thanks in advance!
Hey lenalavendel,
Thanks for your question Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:
function masonry_sort_slash_to_hyphen() { ?>
<script>
window.addEventListener('DOMContentLoaded', function() {
(function($){
$('.av-masonry-sort .text-sep').each(function() {
var text = $(this).text();
$(this).text(text.replace('/', '-'));
});
})(jQuery);
});
</script>
<?php
}
add_action('wp_footer', 'masonry_sort_slash_to_hyphen');
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
Best regards,
Mike