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
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
Hi Rikard,
Sorry, forgot ;)
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
Hi Mike,
That did the trick. Thanks!