Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1428106

    Hi,
    Using the Enfold upcoming events option, I want to hide the .av-upcoming-event-cost and .av-upcoming-event-venue. That works fine with display: none.
    The only thing is that the hyphen remains visible (see screenshot).
    I take it that it’s hard coded in some file but I can’t seem to find it. Any tips ?

    Best regards,
    Steven

    • This topic was modified 11 months, 1 week ago by steviger.
    #1428129

    Hey steviger,

    Thanks for the screenshot. Could you post a link to where we can see the actual element as well please?

    Best regards,
    Rikard

    #1428153

    Hi Rikard,

    Sorry, forgot ;)

    #1428306

    Hi,
    Thank you for the link to your site and your patience, try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function custom_remove_hyphen_script() { ?>
      <script>
    (function($){
      $('.av-upcoming-event-meta').contents().filter(function() {
        return this.nodeType == 3
      }).each(function(){
        this.textContent = this.textContent.replace(' - ','');
      });
    })(jQuery);
    </script>
      <?php
    }
    add_action( 'wp_footer', 'custom_remove_hyphen_script', 99 );

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    Best regards,
    Mike

    #1428409

    Hi Mike,

    That did the trick. Thanks!

    #1428416

    Hi,

    Great, I’m glad that Mike could help you out. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

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