Event Organiser
Previous or next month in a widget doesn't work, but shortcode works! (2 posts)

  1. Erfo
    Posted 3 years ago #


    When I click on next or previous month, the calendar widget doesn't work... I always see the corrent month and the permalink is => http://.../?eo_month=2012-08

    I tried this plugin with a "Twenty Eleven" Theme and it works very good, while in my theme doesn't work.

    I added wp_header() and wp_footer() in correct position, I disabled all plugin and I removed all javascript in header.php, but doesn't work...

    I tried also this "theme":

    <?php wp_head(); ?>
    <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar(1) ) : ?>
    <?php endif; ?>
    <?php wp_footer(); ?>


    Now I deleted the widget and I added this:
    <?php echo do_shortcode('[eo_calendar]'); ?>
    and it works very good...



  2. Stephen Harris
    Plugin Author

    Posted 3 years ago #

    This is a problem with your theme. I suspect your theme is not allowing the widget to add its own classes and so the javascript can’t target the widget calendar.

    Somewhere in your functions.php your theme will make use of register_sidebar. It should look something like:

      'name' => __( 'Side bar name' ),
      'id' => 'sidebar-id',
      'description' => __( 'Widget area description' ),
      'before_title' => '<h1>',
      'after_title' => '</h1>',
      'before_widget' => '<div id="%1$s" class="widget %2$s">',
      'after_widget' => '</div>',

    Notice the %1$s and %2$s in the before_widget argument. These allow the widget to add their own ID and classes to the widget. It seems your theme does not use class="widget %2$s". If you add this in – that should fix the problem. You may want to contact the theme author and alert them to this problem – themes should allow widgets to add their own classes and ID.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Event Organiser
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic