To fix this remove completely function widget_yarpp_init()
from includes.php, also the line add_action(‘plugins_loaded’, ‘widget_yarpp_init’); from yarpp.php
Instead of widget_yarpp_init() place this code, and the plugin will be
working with multiple sidebars:
class YarppWidget extends WP_Widget {
/** constructor */
function YarppWidget() {
parent::WP_Widget(false, $name = 'YARPP Widget');
}
/** @see WP_Widget::widget */
function widget($args, $instance) {
extract($args);
global $wpdb, $post;
if (is_single() && have_posts()) {
get_post($post->ID);
echo $before_widget;
echo $before_title . __('Related Posts','yarpp') . $after_title;
echo yarpp_related(array('post'),array());
echo $after_widget;
}
}
/** @see WP_Widget::update */
function update($new_instance, $old_instance) {
return $new_instance;
}
/** @see WP_Widget::form */
function form($instance) {
$title = esc_attr($instance['title']);
}
} // class YarppWidget
add_action('widgets_init', create_function('', 'return register_widget("YarppWidget");'));
Regards,
George