Home › Forums › Calendar Products › Community Events › Using "Add HTML before event content"
- This topic has 4 replies, 2 voices, and was last updated 6 years, 7 months ago by Anthony Renna.
-
AuthorPosts
-
August 22, 2017 at 10:39 am #1338671Anthony RennaParticipant
I used the Add HTML before event content feature to add some instructions to my calendar page. The problem I am having is that when I go to Add an Event page (I have Community Events plug in) the same content is in front of the submission form. How can i change that and maybe add a separate “Add HTML before event” content to the submission page?
August 22, 2017 at 11:30 pm #1338919JenniferKeymasterHi Anthony,
Thanks for reaching out. The content that you put in that box will display above all of the event pages on your site.
To conditionally display content on certain pages, you can add the following to the functions.php file of your child theme.
function tribe_custom_html_before_event( $before ) {
if( tribe_is_community_edit_event_page() ) {
$before = 'My custom content on the Community page';
}if ( tribe_is_month() ) {
$before = 'My custom content above the month view';
}return $before;
}
add_filter( 'tribe_events_before_html', 'tribe_custom_html_before_event' );You can add in additional conditions and content if you would like – this list of our available functions along with our themer’s guide are great resources for customizing our plugins.
I hope that helps. Please let me know if you have any questions!
Thanks,
Jennifer
August 23, 2017 at 2:26 am #1338945JenniferKeymasterIt looks like we also have an extension that might help you out here…let me know how that works for you!
September 14, 2017 at 9:36 am #1349240Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘Using "Add HTML before event content"’ is closed to new replies.