pecnet,
The way I’ve done it before is as follows. It seems a little long-winded at first, but tends to produce the best (consistent) results.
Create a repeater field: opening_hours
. You make it so each ‘row’ has:
- ‘Day’ (dropdown…Mon-Sun)
- ‘Open’ (text)
- ‘Close’ (text)
Then I make my own WordPress shortcode that loops through the repeater field to output the information in the format I want (HTML, relevant classes…etc.). This negates your requirement for loads of specifically named data (eg. hour_sunday
).