Setting Calendar to one month

Home Forums Calendar Products Events Calendar PRO Setting Calendar to one month

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #57527
    Simon
    Participant

    Can I set the Calendar to just show October 2013? I have a festival that just covers this time period.
    Cheers
    Simon

    #58289
    Rob
    Member

    Hi there Simon. It seems to me the easiest way to do this (without modifying the code) would be to just target your links on the calendar to the October view. So rather than linking to siteurl.com/events, you’d link to siteurl.com/events/2013-10/ ? Are you looking to actively eliminate access to all other months/views?

    #58395
    Simon
    Participant

    Rob,
    Thanks for that – do I change the Event URL slug in Event Settings/General to this or via another route? I could do with freezing the widget on the site to October and yes, eliminate access to all other months.

    #59203
    Rob
    Member

    Yo Simon! Basically the way I was thinking you’d do it would be to just change your menus under Appearance -> Menus to target /events/2013-10 instead of just /events. But that wouldn’t eliminate access to other months; it would just start users who clicked there on the month you specified (rather than starting them on the main calendar for the current month and allowing them to navigate around as they saw fit).

    Removing access to the other months entirely is a substantially broader effort, unfortunately. It’d require some hacking at the code and customization that is admittedly outside the scope of what we can help on (and because it’d require modifying core plugin files, your changes would be lost whenever you update the plugin).

    Knowing this: does the month targeting solution work as a stopgap?

    #59241
    Graeme
    Participant

    Hi Simom / Rob – I have a similar request, relating specifically to the min calendar (you can see my post here: https://theeventscalendar.com/support/forums/topic/mini-calendar-display-month-of-next-upcoming-event/)

    I’m happy with hacking the plugin files (I can restore what I need after an upgrade), but could just use a gentle nudge in the right direction. Any suggestions Rob?

    Thanks,
    Graeme.

    #59333
    Rob
    Member

    Hi there Graeme. Good question; while this is outside my area of expertise, it doesn’t seem particularly unreasonable. Let me see if Barry or another member of the team can point you in the right direction here.

    #59334
    Graeme
    Participant

    Thanks Rob.

    #59392
    Graeme
    Participant

    Simon – a solution for you has been suggested here: https://theeventscalendar.com/support/forums/topic/mini-calendar-display-month-of-next-upcoming-event/

    It works fine for me mate, so good luck.

    To pass a specific month (rather than just next upcoming event month), just edit the last line call the function with a date param, so:

    FROM:

    new Tribe_Advance_Minical();

    TO:

    new Tribe_Advance_Minical(‘2013-10’);

    Good luck.

    #59415
    Simon
    Participant

    Graeme; thanks for your input, much appreciated. Is this solution a theme Function in function.php or a file in the Event Calender plug-in php files. Just got lost with all the connected threads.
    So put this where?
    new Tribe_Advance_Minical(’2013-10′);

    Cheers
    Simon

    #59417
    Graeme
    Participant

    Stick it in the theme’s functions.php, but you need to include all the code Barry placed on pastbin, not just that function call.

    Good luck

    #59487
    Simon
    Participant

    Graeme/Rob,
    Thanks for all your help. Will go down the route you advised. Just one quick note though (to Rob and Tribe) I would have that thought this would be a simple function included in the plug-in as it’s a pretty common occurrence at an event/festival to have the events over one or two months or a weekend.
    Again thanks.
    Simon

    #59577
    Barry
    Member

    Hi Simon, to go back to your original question first of all:

    Can I set the Calendar to just show October 2013?

    You could try adding this snippet to your functions.php file – with that in place and assuming you’ve set the default view to Month View then it should go straight to October 2013.

    It won’t stop users from navigating forwards/backwards once they arrive on that page, but if that was necessary there are a number of ways you could do it.

    Does that snippet basically get you closer to what you want (with the main events view)?

    #60231
    Rob
    Member

    Hey Simon! Just wanted to follow-up here as per Barry’s last note. Can you let us know if you need anything else, or if this thread can indeed be closed? Thanks in advance.

    #62122
    Rob
    Member

    Going to close this one out. Simon, if you need further help please let us know by opening a new thread and we’ll do what we can to assist.

    #980188
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Setting Calendar to one month’ is closed to new replies.