opening times shortcode – make each segment on new line

WPPizza – A Restaurant Plugin for WordPress Support Feature Requests opening times shortcode – make each segment on new line

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #7039
    nostahl
    Participant

      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:00pm

      also can it be rendered in table so the hours line up and the days line up nicely

      #7040
      Olly
      Admin & Mod

        you can do whatever you like. that’s what css is for

        #7041
        nostahl
        Participant

          are 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

          #7042
          Olly
          Admin & Mod

            the
            1-4
            5
            etc

            refer 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 selector

            #7043
            nostahl
            Participant

              btw 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;
              }
              #7044
              Olly
              Admin & Mod

                or wrap it in a div (with an id presumably) and don’t bother with the classes/classnames…

                #7045
                nostahl
                Participant

                  ya but to get them on individual lines and then float right the times.. this css works well for that.

                  #7046
                  Olly
                  Admin & Mod

                    i 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

                    #7047
                    Olly
                    Admin & Mod

                      >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

                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • The topic ‘opening times shortcode – make each segment on new line’ is closed to new replies.