• Resolved Jarrod

    (@jcochran904)


    I am building a site for a church that livestreams its services. On the homepage I need to have 2 different sliders that appear at different times:
    Slide A is the main slider that shows during the week all the time.
    Slide B is the slider for livestream.

    I need slide B to appear on Sundays from 10:25am to 12:40pm, and Wednesdays at 6:55pm to 8:40pm, while at the same time making slide A disappear and obviously come back when slide B is off….

    I thought I had it figured out but unfortunately it didn’t work. Please help!

    https://www.ads-software.com/plugins/shortcodes-to-show-or-hide-content/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Dave Clements

    (@thewanderingbrit)

    Sure thing. Something like this should do it:

    [time-restrict-repeat type="weekly" onday="sunday" offday="sunday" ontime="10:25:00" offtime="12:40:00"]Slider B[/time-restrict-repeat][time-restrict-repeat type="weekly" onday="sunday" offday="wednesday" ontime="12:40:00" offtime="18:45:00"]Slider A[/time-restrict-repeat][time-restrict-repeat type="weekly" onday="wednesday" offday="wednesday" ontime="18:45:00" offtime="20:40:00"]Slider B[/time-restrict-repeat][time-restrict-repeat type="weekly" onday="wednesday" offday="sunday" ontime="20:40:00" offtime="10:25:00"]Slider A[/time-restrict-repeat]

    Thread Starter Jarrod

    (@jcochran904)

    That seemed to work, but then after slide a came back on it shows two… I’m guessing the times are messed up somehow… Here’s what I have (I had to adjust the times some)
    [time-restrict-repeat type=”weekly” onday=”sunday” offday=”sunday” ontime=”10:25:00″ offtime=”12:00:00″]Slide B[/time-restrict-repeat]
    [time-restrict-repeat type=”weekly” onday=”sunday” offday=”wednesday” ontime=”12:00:00″ offtime=”18:55:00″]Slide A[/time-restrict-repeat]
    [time-restrict-repeat type=”weekly” onday=”wednesday” offday=”wednesday” ontime=”18:55:00″ offtime=”20:30:00″]Slide B[/time-restrict-repeat]
    [time-restrict-repeat type=”weekly” onday=”wednesday” offday=”sunday” ontime=”20:30:00″ offtime=”10:25:00″]Slide A[/time-restrict-repeat]

    Plugin Author Dave Clements

    (@thewanderingbrit)

    Hmm, well, in the eyes of the plugin, there’s no difference between my code and yours (except the times), but at any rate, I’m glad that you got it working in the end.

    Thread Starter Jarrod

    (@jcochran904)

    Sorry I think I worded it weird. It isn’t clearing slide A when slide B is on, and then when just slide A is supposed to be on it is showing 2 slide A’s.

    Plugin Author Dave Clements

    (@thewanderingbrit)

    Hmm, so it’s always showing one slide A and then another instance of the slider alternates correctly between slide A and slide B? It sounds like you’re calling an extra instance of Slide A somewhere that isn’t regulated by the shortcode time restrictions. Another option is to add these shortcodes to a test page and change Slide A and Slide B for “shortcode 1”, “shortcode 2” etc. so that you can identify which one is showing up when it shouldn’t be.

    Thread Starter Jarrod

    (@jcochran904)

    Here’s a link to a test page.
    https://www.thefwcdemo.us/test/

    The coding is:
    [time-restrict-repeat type=”weekly” onday=”sunday” offday=”sunday” ontime=”10:25:00″ offtime=”12:00:00″]We’re Live[/time-restrict-repeat][time-restrict-repeat type=”weekly” onday=”sunday” offday=”wednesday” ontime=”12:00:00″ offtime=”18:55:00″]Regular Home[/time-restrict-repeat][time-restrict-repeat type=”weekly” onday=”wednesday” offday=”wednesday” ontime=”18:55:00″ offtime=”20:30:00″]We’re Live[/time-restrict-repeat][time-restrict-repeat type=”weekly” onday=”wednesday” offday=”sunday” ontime=”20:30:00″ offtime=”10:25:00″]Regular Home[/time-restrict-repeat]

    Plugin Author Dave Clements

    (@thewanderingbrit)

    Hmmm, that one’s got me baffled. Can you change the test to the following so that I can troubleshoot further:

    [time-restrict-repeat type="weekly" onday="sunday" offday="sunday" ontime="10:25:00" offtime="12:00:00"]1[/time-restrict-repeat][time-restrict-repeat type="weekly" onday="sunday" offday="wednesday" ontime="12:00:00" offtime="18:55:00"]2[/time-restrict-repeat][time-restrict-repeat type="weekly" onday="wednesday" offday="wednesday" ontime="18:55:00" offtime="20:30:00"]3[/time-restrict-repeat][time-restrict-repeat type="weekly" onday="wednesday" offday="sunday" ontime="20:30:00" offtime="10:25:00"]4[/time-restrict-repeat]

    Thread Starter Jarrod

    (@jcochran904)

    Sure thing. Just updated it.

    Thread Starter Jarrod

    (@jcochran904)

    At the time of the update, 03-15-15 3:14 pm EST, both 2 and 4 are showing.

    Thread Starter Jarrod

    (@jcochran904)

    Wednesday at 6:55pm 3 and 4 show

    Thread Starter Jarrod

    (@jcochran904)

    Thursday is only showing 4.

    Thread Starter Jarrod

    (@jcochran904)

    Looks like maybe the codes just don’t work with the newest WordPress update.

    Hi!

    How can i set the opening time for a restaurant, if thats open on mondays – fridays 09:00 – 21:30 and on saturdays from 09:00 to 20:00?

    Thanks for the help!

    Plugin Author Dave Clements

    (@thewanderingbrit)

    Philip,

    In future, you should start your own thread, but in general:

    `[time-restrict-repeat type=”daily” ontime=”09:00:00″ offtime=”21:30:00″]
    [time-restrict-repeat-2 type=”weekly” onday=”Monday” offday=”Friday”]
    Our restaurant is currently open
    [/time-restrict-repeat-2]
    [/time-restrict-repeat]
    [time-restrict-repeat type=”weekly” onday=”Saturday” offday=”Saturday” ontime=”09:00:00″ offtime=”20:00:00″]
    Our restaurant is currently open
    [/time-restrict-repeat]

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Help with codes’ is closed to new replies.