Hiding 'HTML before event content' on single event pages

Home Forums Calendar Products Events Calendar PRO Hiding 'HTML before event content' on single event pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1223470
    Nick
    Participant

    Hi there,

    We’re currently using the field ‘HTML before event content’ in the Display area of the Event Calendar settings.

    This content appears fine on the main event page (the calendar view), and also each individual event pages.

    We wanted to hide this content on the individual event pages.

    We’ve tried adding a CSS class to hide this, but because the content containers have the exact same class name, and the exact same ancestors, we can’t only target the individual event page instances of this container.

    We could also probably the tribe_events_before_html() function in general.php to achieve this, but wanted to avoid it as I’m sure it’ll cause problems when we update the plugin.

    Any ideas? All help much appreciated!

    #1223492
    Nick
    Participant

    Just a quick addition to this. We’ve copied the single-event.php template into our theme and added some JavaScript in that to hide the tribe-events-before-html element.

    This works well, but if you had any better solutions it would be great to hear them

    #1223928
    Geoff B.
    Member

     

    Good afternoon Nick and welcome back!

    Thank you for reaching out to us.

    We are sorry to hear about the struggles you have faced while trying to hide the before HTML content on single-event pages. I would love to help you with this topic.

    Try adding the following CSS rule to your style.css file or in your Custom CSS metabox:

    .single-tribe_events .tribe-events-before-html {display:none !important;}

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1238715
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hiding 'HTML before event content' on single event pages’ is closed to new replies.