Reply To: Styled Business Hours Widget

Home Forums Main Forum Theme Suggestion Box Styled Business Hours Widget Reply To: Styled Business Hours Widget

#23055
Sushil Adhikari
Moderator

Hi Ellen,

In order to change the order of day you need to customize the widget_business_hours.php file. We had done customization for you, please find the attached file and place it on following directory overwriting the existing file:

rootfolder/wp-content/themes/sleeky-pro/sleeky_includes/widgets/widget_business_hours.php

This changes will be lost whenever you update your theme,

As widget file is functionality file and not a template file so simply copying it in the child theme with same path structure and changing there will not work. It can be little complex, but what you should do is. In your functions.php file of child theme, copy the whole widget class code that you are willing to edit eg: lavish_Widget_Business_Hours widget class, copy all code of this widget class

class lavish_Widget_Business_Hours extends WP_Widget {
function lavish_Widget_Business_Hours() {
//all code here and make changes as you like
}
Rename it to something like lavish_Widget_child_Business_Hours, make your changes there and register the new widget [email protected] here for registering the widgets http://codex.wordpress.org/Function_Reference/register_widget. Now, in Appearance->Widget you will see both widgets from parent theme and the one your created.

Let us know if you get any problems on this, we will be more than glad to assist you.

Thanks
widget_business_hours.zip

Attachments:
You must be logged in to view attached files.