Opening Hours – add custom template
-
Have not been successful adding my own custom template to the widget for the overview so was wondering how I might add this alternative template? Yes, even if it means changing the core files or possibly adding in hooks or other gizmos to the plugin.
Currently there are only table and list (description list) templates. I understand description lists are suited to this content but I would still prefer the option to create my own templates.
For example, I have a nice styled layout done in CSS with a compact horizontal display, background colors and CSS “border” arrows on day headings that looks awesome and works great.
Initially I styled this using the existing classes for the list dl, dd, dt tags. However, one drawback is the way the description lists are structured. Without a “wrapper” around each “day” block I can’t keep them together as the screen changes size.
I simply modified the current “list” template (overview-list.php) to change everything from dl, dd and dt to <div> tags. I could then add another div wrapper around each day to keep them together.
Of course… once I update the plugin I will have to copy those changes back in… it’s a pain but just one file in my situation.
My thought is how difficult to create my own “template” that I can select in the widgets? I fiddled with the files and tried to do this on my own without success yet.
The topic ‘Opening Hours – add custom template’ is closed to new replies.