Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Timetable and Event Schedule How to add the sidebar widget in a template directly
- This topic has 0 replies, 1 voice, and was last updated 8 years, 2 months ago by J. Davis.
- AuthorPosts
- September 7, 2016 at 11:59 am #374795J. DavisKeymaster
Hi,
Is it possible to provide me with the code to add the sidebar widget directly into my template?
I Added a class to my widget in order to display the event name in an inline-block with a min width.
Is there a way to add my customization to my child theme, or easier, any chance you will add a class the the event name in the widget. See screenshot:
https://www.evernote.com/l/ASF4u5jJukxDm7fQTsuI0_G3yKWgMGwuJJ4
Sorry for bombard this forum 🙂
It would be great if we can display “tomorrow upcoming” events.Thank you
September 7, 2016 at 12:06 pm #374801J. DavisKeymasterHi,
-First of all make sure you use latest version of plugin.
-In order to customize output of widget or any other block you can usemptt_render_html
filter.
-Create /mptt/ folder in the root directory of your theme. Then copy widget-upcoming-view.php file to it. It should look like /your_theme_folder/mptt/widget-upcoming-view.php
-Add code below to functions.php file:add_filter('mptt_render_html', 'my_mptt_render_html', 10, 4); function my_mptt_render_html($includeFile, $template, $data, $output) { if ( $template && $template == 'theme/widget-upcoming-view') { return dirname(__FILE__) . '/mptt/widget-upcoming-view.php'; } return $includeFile; }
-There might be troubles if we edit source file. We’ll review plugin code and will add more actions and filters.
Best regards,
John - AuthorPosts
- You must be logged in to reply to this topic.