WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] Widget Size Question (3 posts)

  1. chooseamc
    Member
    Posted 2 years ago #

    Love your plugin but wondering how to get the width of the widget to be the full size in the widget container (about 200px instead of 100px). Tried using the regular widget you provided but ended up using the shortcode as a widget instead (to get the months to change). Either way, the calendar displays too narrow.

    http://www.bdfirearmstraining.com (bottom widget).

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

  2. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    Glad you like the plug-in :). This is just a theme-styling problem. Try adding

    .eo-calendar table{
           width:100%;
         }

    to your theme's style.css file.

    If the widget wasn't navigating properly this is probably due to the theme not allowing the plug-in to add its own classes to the widget. (These classes are needed for the javascript to listen for the next/prev clicks and change the calendar accordingly).

    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>',
    ));

    The %1$s and %2$s in the before_widget argumentBallow the widget to add their own ID and classes to the widget. Your theme probably does not use class="widget %2$s". If you add this in – that should fix the problem.

    All the best,
    Stephen

  3. chooseamc
    Member
    Posted 2 years ago #

    Hi Stephen,

    Thanks for the style code - worked like a charm. And, for whatever reason, the script works now too. The theme I use (U-Design) already did have the proper coding.

    Thanks much for the quick response. Best I've ever had from any plugin developer!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags