• Resolved shareef790

    (@shareef790)


    Hi
    I have installed ‘We are open’ plugin on the website shown above. I would like to know if there is a way we can add some conditional text to display the specific image instead of the text there? Please check here: https://www.techsmartaustralia.biz/wbhunter – Can we have a conditional text like this: If open ‘display this image’ and if closed display ‘another image’ – Is that possible? Thanks

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Design Extreme

    (@designextreme)

    @shareef790 Yes, this is certainly possible!

    [open_now]<img src="/url/to/open-image.jpg" alt="We’re Open!">[/open_now]
    [closed_now]<img src="/url/to/closed-image.jpg" alt="Sorry, We’re Closed">[/closed_now]

    Details of additional parameters (such as automatic switching between the two versions) are listed in the Shortcodes tab.

    If you want me to make a special SVG image of the We’re Open! motif with a We’re Closed alternative, please drop me a message.

    Thread Starter shareef790

    (@shareef790)

    Thanks mate. Yes if you have a special SVG image we are open and closed that would be great thanks

    Plugin Author Design Extreme

    (@designextreme)

    @shareef790 At the moment, this doesn’t exist, but I can add something to a subsequent version of the plugin using a special HTML class.

    In the meantime, I’ll share an SVG of the plugin’s motif using the contact details I have for you.

    Plugin Author Design Extreme

    (@designextreme)

    @shareef790 I have added the two versions of the We’re Open and We’re Closed motifs as SVG – please download using this WeTransfer link. The link will expire in 14 days.

    Plugin Author Design Extreme

    (@designextreme)

    @shareef790 I’ve improved the conditional text and replacement codes so you can now check for logic like “closed now, but open later” or “closed now and not open later”.

    Is there a global php function that determine whether the store is open at run time that other plugins can access?

    Plugin Author Design Extreme

    (@designextreme)

    @realheman No there isn’t. I would be open to a suggestion about how you’d like this to work?

    Perhaps a regular task (using CRON) that will switch an option (e.g. we_are_open_status) to 1 for open and 0 for closed? It would only be as effective as the regularity of the task.

    Or a function (such as we_are_open_status) outside of the Class that will return TRUE or FALSE?

    If you want to use it on the front-end there are shortcodes for this. You can perform a check with JavaScript/jQuery and use an Ajax request to load new data.

    • This reply was modified 4 years, 10 months ago by Design Extreme. Reason: Added function suggestion
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Display ‘We are open’ image’ is closed to new replies.