Okay
  Public Ticket #2497781
Display of opening hours
Closed

Comments

  •  4
    mike started the conversation

    Hi there & thanks for the nice theme!

    My client has a little bit complex opening times which are difficult to implement nicely. Please have a look at the "Related URL" I mentioned.

    In the footer you see what I would like to achieve. 
    But in the sidebar same page it looks quite messy.  
    Are these not the same widgets?

    My desired perfect case you can see in the screenshot. Would be great if you can give me a hint on how to achieve :) 

    Big thx in advance

    Mike


  •  1,710
    Barry replied

    Hi Mike,

    Thank you for the compliment!

    There is only 1 opening hour widget but you can add it on multiple locations in the theme like in the footer and sidebar. Probably the sidebar is a little narrower than the space available in the footer.

    You can try to change the width of the sidebar a little bit with some custom CSS code:

    @media (min-width: 992px) {
        .content-area .col-md-9 { width: 75%; }
        .content-area .col-md-3 { width: 25%; }
    }
    

    The 75% can be lowered and the 25% increased. Just make sure that both end up on 100%

    Another option is to decrease the padding of the opening hour widget in the sidebar:

    .content-area .opening-hours {
        padding: 20px 35px;
    }
    

    The 35px value can be reduced to lower the left and right padding.

    You can add custom CSS via Appearance -> Customize -> Additional CSS

    If you would like to make the dash icon separator an "&" symbol you can do that via Appearance -> Customize -> Theme Options -> Opening Hours & Translations at the "Separator" option.

    Hope this helps.

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes

  •  4
    mike replied

    Hey Barry & big thx for your super fast response.

    -Your first CSS snippet didn't do anything on my site. ;(

    -2nd snippet did the job after playing around with the px values. Yeah :)

    -Your suggestion regarding the separator to replace - with & is not possible in my case because it will replace all "-"

    Please have a look at my site now and you can see what I mean. Now on Wednesday I have that little "&" sign. Possible to hide it by CSS? I would be OK to change it's color to transparent. Or do you have a more elegant solution? like "display NO" or something?

    I also tried 08:00 - 12:00 & GESCHLOSSEN (CLOSED) but it looks too stuffed and messy.

    Thx again, 

    Mike


  •  1,710
    Barry replied

    Hi Mike,

    That's strange I just tested the first CSS snippet again on my Physio theme installation and it work without any issues. It will not actually change anything to the opening hour widget itself it will only make the sidebar wider so the content inside the opening hour widget will get more space. 

    Good to hear that the second CSS fix did the jobsmile.png

    Unfortunately the separator symbol is not wrapped within a HTML tag so it is not possible to target this element with CSS. Another option to remove the "&" symbol from Wednesday is to set a fixed with to the opening hours of this day and make content that fall outside this width invisible. Hope this explanation make sense but you can try it by using the following CSS:

    .opening-hours ul li:nth-child(3) span.right {
        width: 95px;
        text-indent: -10px;
        overflow: hidden;
        left: 11px;
        position: relative;
    }

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes

  •  4
    mike replied

    Hey Barry.

    I know now why the first CSS didn't work for me at all at first. It was because I was looking at my "kontakt" page and there the sidebar is left side.
    But the code you gave me was for right-sidebar.

    Conclusion: I have a mix of all of the CSS you gave to me and now it looks perfect in frontend. I will check on some other devices/browsers and screensizes but for now I am super happy.

    Have a great weekend!

    Cheers & god bless you ;)

    Mike


  •  1,710
    Barry replied

    I'm happy to hear that Mike.

    Thanks! Have a great weekend toosmile.png

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes

  •  4
    mike replied

    Barry! Hope u've had a great weekend.

    1 last little issue to bother u with opening hours issue.

    In my footer the opening times "special sentence for announcements or holidays"

    is shrank to 2 lines. Please look at the screenshot.

    In the sidebars (left&right) it looks fine.

  •  1,710
    Barry replied

    Hi Mike,

    I see, can you add the following CSS to Appearance -> Customize -> Additional CSS as well:

    .footer .opening-hours span.extra {
        clear: both;
        display: block;
    }
    

    If you would like to have the text centered just like in the sidebar you can add this one instead of above snippet:

    .footer .opening-hours span.extra {
        clear: both;
        display: block;
        text-align: center;
    }

    Hope this helps.

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes

  •  4
    mike replied

    You are the best Barry!

    God bless you ;)

    Cheers-

    Mike

  •  1,710
    Barry replied

    You're welcomesmile.png

    If you have any other questions please let me know.

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes