I have added a custom button next to the export button in the events list by echoing it in the maybe_add_link() function in the-events-calendar/src/Tribe/iCal.php.
Is there a way to do this in my functions.php instead of modifying the code of the plugin?
Great question! Yes, that would be possible. For example, you could write a function that checks for what view is currently being viewed and display content based on that condition:
add_filter('tribe_events_before_html', 'tribe_custom_content');
function tribe_custom_content() {
if( tribe_is_photo() && is_tax() ) {
echo 'This is a Category in Photo View!';
}
}
Will that help you get started? Please let me know. 🙂
Yes that works!
So there’s tribe_events_before_html and tribe_events_after_html,
but what about adding something before or after a specific element inside the html? Like the tribe-events-page-title or tribe-events-bar
Are there functions for that as well?
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
Author
Posts
Viewing 6 posts - 1 through 6 (of 6 total)
The topic ‘Adding a button to the category view’ is closed to new replies.