Support » Plugin: Event Organiser » [Plugin: Event Organiser] Previous or next month in a widget doesn't work, but shortcode works!

  • Hi.

    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”:

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

    nothing…

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

    Why?

    http://wordpress.org/extend/plugins/event-organiser/

Viewing 1 replies (of 1 total)
  • 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:

    register_sidebar(array(
      '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.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Event Organiser] Previous or next month in a widget doesn't work, but shortcode works!’ is closed to new replies.