Home › Forums › Calendar Products › Events Calendar PRO › Load widget assets on post edit screens
- This topic has 5 replies, 2 voices, and was last updated 6 years, 3 months ago by Greg Perham.
-
AuthorPosts
-
November 30, 2017 at 11:57 am #1396030Greg PerhamParticipant
Other plugins allow widgets to be placed on pages in different ways (e.g., page builders and sidebar widget customizers). I found
load_widget_assets()
and saw it is limited to widget.php and customize.php, and the effect is that. I tried to add them, but a number of assets are obviously still missing.function jjml_tec_load_widget_assets() { $screen = get_current_screen(); if( ! is_object( $screen ) || 'page' !== $screen->post_type || ! function_exists( 'tribe_events_pro_resource_url' ) ) return; Tribe__Events__Template_Factory::asset_package( 'select2' ); wp_enqueue_script( 'tribe-admin-widget', tribe_events_pro_resource_url( 'admin-widget.js' ), array( 'jquery', 'underscore' ) ); } add_action( 'admin_enqueue_scripts', 'jjml_tec_load_widget_assets' );
How can I get all the necessary assets to load on page/post edit screens?
December 4, 2017 at 10:13 am #1397955Jaime MarchwinskiKeymasterHi Greg,
Thanks so much for reaching out!
Unfortunately we are limited by our Support Policy in how much we can help with customizations. Though I will try to point you in the right direction. I’d recommend starting off by taking a look at our Themer’s Guide, which can show you how to safely edit and copy our templates and views:
https://theeventscalendar.com/knowledgebase/themers-guide/
If you are simply looking to add our widgets to other pages and posts, you can take a look at the following article, which can give you instructions as to how to make that happen:
https://theeventscalendar.com/knowledgebase/inserting-calendar-content-posts-pages/
If this functionality is a requirement for your intended project, I’d suggest that a third-party developer would be the best way to make this feature happen on a short timeline. ? We maintain a list of developers who work with our plugins on our Knowledgebase here:
https://theeventscalendar.com/knowledgebase/find-a-customizer/
I hope this helps! Let me know how it goes and if you have any other questions!
Thanks,
Jaime
December 4, 2017 at 10:19 am #1397965Greg PerhamParticipantOkay, I will make a different request: Please make your widget usable in settings other than the primary Widgets screen. Page builder plugins (and Gutenberg) and custom sidebar plugins allow widgets to be created while viewing other pages of the admin. Your widget is not able to be configured in these scenarios.
December 5, 2017 at 5:45 am #1398492Jaime MarchwinskiKeymasterHi Greg,
Thanks for the idea. You can vote on this idea or add a new one here: https://tribe.uservoice.com/forums/195723-feature-ideas/suggestions/5852300-compatiblity-with-page-widgets-and-similar-plugins. We implement features based on custom feedback, so your vote is greatly appreciated. Also this feature request may have some helpful tips to get things working closer to what you are looking for.
Let me know if anything else comes up!
Thanks,
Jaime
December 27, 2017 at 8:35 am #1413293Support 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 ‘Load widget assets on post edit screens’ is closed to new replies.