WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] widget width and moving between months (3 posts)

  1. themandril
    Member
    Posted 2 years ago #

    I noticed you said in the readme that if we couldn't resolve something you might take a look - I'd appreciate your help. (the plugin is awesome, by the way)

    We can't move from month to month in the widget, and the widget is too narrow, it doesn't fill the width of the sidebar.

    http://www.magicalmonsters.com/clients/usgbc-ok/new-site/board-staff/

    Thank you so much!

    http://wordpress.org/extend/plugins/wp-events/

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

  2. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    Hi themandril

    This is just a problem with the theme. The narrowness could be corrected by tweaking your theme's style CSS (the plug-in doesn't add any styling to the widget calendar, but relies on the theme).

    The issue regarding navigating the calendar is because the theme doesn't allow the plug-in to add its own classes to the widget. This classes are are how the plug-in's javascript files listen for a click (previous / next) and display the correct month.

    See this post by me on April 19th 2012: http://www.harriswebsolutions.co.uk/event-organiser/forums/topic/cannot-switch-between-months-on-widget-calendar/page/2/#post-1827

    You'll need to contact the theme developer or make the tweaks yourself - but the problem lies in where the theme registers the sidebar (in functions.php).

  3. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    After migrating sites, the above link will not work.

    Here's the relevant bit:

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.