Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1375013

    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!

    #1375058

    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.
    2022-12-04_170406.png

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.