How to force a calendar refresh?

Home Forums Calendar Products Events Calendar PRO How to force a calendar refresh?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1056073
    scamrcalendar
    Participant

    The full page calendar you folks have created it great! It is just what the client wanted. Thank you!

    They also want a smaller version on their home page. However, the mini-cal wigit is too small – they still want to see the actual event names, vs just a dot letting them know something happens on that day.

    I have been able to build the page with a smaller ver of the main calendar, but have run into one issue. I apparently have copied some static info somehow, so the opening page (January) has outdated stuff on it, and is missing the new events recently added. In fact, the events that are being shown have been deleted some time ago. If, however, I click to view February’s events, and then come back to January, now everything looks as it should.

    It appears that I need to call something to refresh the opening calendar before it displays, but I’m not sure what/how that would be accomplished. Or maybe the data is stuck in a back-end data file that I need to clean up?

    Summary:
    http://suncityanthemhikingclub.com is the home page. Clicking on HOME tab shows the outdated cal. Refresh page and it is still outdated. Click to view February, and then click January to view previous month and now January is shown with correct data.

    http://suncityanthemhikingclub.com/events is the full cal, which works fine.

    #1056175
    George
    Participant

    Hey @Kathleen,

    Thanks for reaching out. This a tricky issue and unfortunately, we cannot help with customizations or with any problems that arise as a result of customizations. 🙁

    That being said, you might be able to get things to load/refresh by adding some code like the following to your theme’s functions.php file:


    add_action( 'wp_footer', 'tribe_support_1056073' );

    function tribe_support_1056073() {
    ?>
    <script>
    jQuery(window).load(function(){
    if ( typeof tribe_events_calendar_ajax_post == 'function' ) {
    tribe_events_calendar_ajax_post();
    }
    });
    </script>
    <?php
    }

    I do not know if this will solve your problem 🙁

    But it might help!

    Thanks,
    George

    #1056268
    scamrcalendar
    Participant

    Thanks for the quick reply George.

    Unfortunately the parser doesn’t like the ? that follows tribe_support_1056073(){

    I’m new at php, and haven’t yet figured out why. But I’ll keep digging into it.

    Is there a file someplace that stores things like the date (month) etc? Or are those passed into variables on the fly and I just see them as static data when I look at the code on the calendar page?

    Again, thanks for your help and pointers.

    Cheers
    Kathy

    #1056277
    George
    Participant

    Hey Kathy,

    I’m sorry to hear about this – when you say the “parser”, can you clarify what you mean? I don’t have any errors with this code on my own site – apologies for adding another headache to this.

    Is there a file someplace that stores things like the date (month) etc? Or are those passed into variables on the fly and I just see them as static data when I look at the code on the calendar page?

    When you ask about “things like the date (month)”, do you mean just the literal names of months and when they occur? Because these are stored as part of the PHP language itself; WordPress, and thus The Events Calendar, just uses these features of PHP to power anything date/time-related.

    Or, do you mean event data? Because event data, like the post title and content of and event, is saved in the database in the same way “normal” Posts and Pages within WordPress are. If you are asking about the “month view”, as in the grid of events itself, then it’s a mix of both “saved” items and “on-the-fly” functions; the grid is a container and as you paginate through the months, event data that is stored in the database is “pulled in” via AJAX and then placed into the container on-the-fly.

    I hope this information helps.

    Sincerely,
    George

    #1056347
    scamrcalendar
    Participant

    Hi George,

    Sorry about my cryptic questions. By “parser”, what I meant was that when I’d try to load the page, I would get an “unexpected ?” at line 33, or similar such error. Turns out I had put the function in the wrong spot in the functions.php file. Once I figured that out, the “unexpected ?” error went away.

    Your explanation about how the month view, grid of events is stored/retrieved was exactly what I was looking for – I just didn’t ask it well. Great job sorting through the muddle of my questions.

    The function you supplied doesn’t appear to have worked – but I will keep playing around with things.

    I truly appreciate the time you have put in to helping me with this custom issue – time you did not have to do.

    Many thanks – you rock!

    Cheers
    Kathy

    #1056689
    George
    Participant

    No worries at all here, Kathy. I really appreciate your patience with some of my questioning and for being cool/polite/understanding about our customization policies and such.

    Thank you 🙂

    I will close up this thread for now but would like to mention that you can always open a new thread, any time, if other issues/questions arise.

    I wish you the best of luck with your customizations.

    Sincerely,
    George

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘How to force a calendar refresh?’ is closed to new replies.