WPPizza – A Restaurant Plugin for WordPress › Support › Feature Requests › opening times shortcode – make each segment on new line
- AuthorPosts
- 13 January, 2015 at 5:53 pm #7039
the shortcode for opening times.
can it be made so each segment is on a new line
ie
mon-thur 9:00am -4:00pm
fri-sat 11:00am – 12:00pmalso can it be rendered in table so the hours line up and the days line up nicely
13 January, 2015 at 6:06 pm #7040you can do whatever you like. that’s what css is for
13 January, 2015 at 6:12 pm #7041are the classes always the same though.
.wppizza-optm-1-4 .wppizza-optm-5 .wppizza-optm-6 .wppizza-optm-7
are the ones used with my opening times
so if I change the hours in 6 months will it break my css
13 January, 2015 at 6:21 pm #7042the
1-4
5
etcrefer to the days that are in the same span
(1 being monday 7 being sunday so 1-4 refers to the mon to thu span etc)if you change opening times in the future than those will change (possibly, depends on the tom changes you make of course)
doesnt matter one bit though, if you wrap the whole thing in a div/span/whatever and use the appropriate selector13 January, 2015 at 6:22 pm #7043btw for anyone finding this thread –
Here’s how I made it display a little more orderly – your mileage may vary – you may have to change the classes to match your site.
.wppizza-optm-1-4, .wppizza-optm-5, .wppizza-optm-6, .wppizza-optm-7 { display: block; clear: both; } .wppizza-optm-1-4 > span, .wppizza-optm-5 > span, .wppizza-optm-6 > span, .wppizza-optm-7 > span { float: right; }
13 January, 2015 at 6:28 pm #7044or wrap it in a div (with an id presumably) and don’t bother with the classes/classnames…
13 January, 2015 at 6:30 pm #7045ya but to get them on individual lines and then float right the times.. this css works well for that.
13 January, 2015 at 6:30 pm #7046i might add some more classes one day (or add a filter or something), but can’t really see the point adding more bloat when it’s not required
13 January, 2015 at 6:32 pm #7047>this css works well for that.
not saying it doesnt, but you can do the same without relying on the classnames (so it doesnt matter how the days end up being grouped - AuthorPosts
- The topic ‘opening times shortcode – make each segment on new line’ is closed to new replies.