• Resolved brigittepica2

    (@brigittepica2)


    Hello support,

    Is there an option/shortcode for only showing the schedules for the next two weeks? And hide all the weeks more in the future?

    So when someone is opening the schedule on 1st February, he will only see 1st – 14th February. The rest is hidden. And when he looks again on 10th February, he can only see 10 – 24 February.

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author plainware

    (@plainware)

    Hello,
    sorry for not replying sooner.

    There’s a partial solution for this, in the shortcode you can set the default date range to start with. It only works in the list view though. Like this:

    [shiftcontroller4 end="+2 weeks" type="list"]

    But it won’t prevent the user from choosing a different date range.

    Plugin Author plainware

    (@plainware)

    Hello,
    anyway, I went ahead and make a quick add-on plugin that simply doesn’t show shifts beyond 2 weeks from today, it applies only to the front end view on a page with shortcode, it won’t affect the wp-admin side. It’ll still let the user navigate to a further date range but no shifts will be displayed there.

    Here’s the link:
    https://www.shiftcontroller.com/dist/shiftcontroller-frontend-maxdate.zip

    Install it the usual way – in admin, Plugins, Add New, Upload.
    If you wish, you can manually redefine the allowed range in the code, edit line 10:

    define( 'SHIFTCONTROLLER_FRONTEND_MAXDATE', '2 weeks' );
    

    I hope it helps, please let me know if it works for you.

    Thread Starter brigittepica2

    (@brigittepica2)

    Hi Plainware,
    Thank you so much for this extra plugin – it is really fantastic!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only show next two weeks’ is closed to new replies.