Support » Plugin: My Calendar » [Plugin: My Calendar] [my calendar] Next/previous links do not work on mini calendar widget

  • Resolved Dr_jAcKaSS



    Next/previous months links do not work on Mini calendar widget. After clicking on link it says “loading…” but the same month appears.

    I’m using the following code in my WP theme:
    < ?php echo do_shortcode('[my_calendar format="mini" showkey="yes" shownav="yes"]'); ? >

    The same functionality works perfectly in the full size calendar used on page.

    I’m using My Calendar version 1.10.12.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Joe Dolson


    I’ll check that out. I’m just wrapping up on version 1.11.0, so if this is a bug I’ll try and get it covered in that version.

    Plugin Author Joe Dolson


    I haven’t been able to reproduce this – can you point me to your installation where this doesn’t work, so I can check it out specifically?

    I have further tracked the behaviour…

    The URL of the page where I’m trying to use the mini calendar looks like:

    Links for next/previous are in format:

    There is no page_id variable in the link. Which is rather strange.

    So, if I add manually to the link “&page_id=10” (page id of home page), it works as it should.

    I have also put mini calendar on some other page and it works – there is page_id in the link.

    What could disturb the calendar to not to add the page_id variable to the link?

    I appologize… Joe thank you for your fast response!

    Plugin Author Joe Dolson


    That’s very odd. page_id should certainly not be filtered from the URL; and it’s doubly strange that it isn’t filtered on some other instances of My Calendar (mini calendar uses the same code; it’s just an alternate view of the standard calendar.)

    My test installation has the same style of links; and it’s no problem there.

    You could try switching your permalinks to an alternate format – that would pretty certainly fix the problem, although I can understand if you’re hesitant to change your permalink format.

    I suggest submitting a support request from the Help page; that would give me some additional information that may help.

    Ok, finally I have figured out what is causing the page_id dissapearing from the link.

    It is the query_posts(…) call.

    For the page where I am trying to use mini calendar I have set a template page. In that template I have 2 query_posts() calls. If I remove both, the link includes page_id variable.

    I have also tried puting mini calendar short code before the query_posts() call and after it and the first one works as it should, while the second one is having described issue.

    So, to solve this I have to make those two query_posts() calls somehow differently.

    Finally it was all my mistake. I forgot to add wp_reset_query(); after each query_posts() call.

    Anyway you may consider including this in to the faq, since WP default template is not calling wp_reset_query(); after The Loop, meaning this short code will probably not work even on simple template with only oe query_posts() call.

    Hope this will help anyone having similar issues.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: My Calendar] [my calendar] Next/previous links do not work on mini calendar widget’ is closed to new replies.