is_single; $wp_query->is_single = true; $prev_comic = get_previous_comic_permalink(); $next_comic = get_next_comic_permalink(); $wp_query->is_single = $temp_query; $temp_query = null; $first_comic = get_first_comic_permalink(); $last_comic = get_last_comic_permalink(); echo '
'; } class widget_comicpress_graphical_navigation extends WP_Widget { function widget_comicpress_graphical_navigation() { $widget_ops = array('classname' => 'widget_comicpress_graphical_navigation', 'description' => 'Displays Graphical Navigation Buttons.' ); $this->WP_Widget('graphicalnavigation', 'Comic Navigation', $widget_ops); } function widget($args, $instance) { global $wp_query, $post; extract($args, EXTR_SKIP); echo $before_widget; comic_navigation(); echo $after_widget; } function update($new_instance, $old_instance) { } function form($instance) { } } register_widget('widget_comicpress_graphical_navigation'); function widget_comicpress_graphical_navigation_init() { new widget_comicpress_graphical_navigation(); } add_action('widgets_init', 'widget_comicpress_graphical_navigation_init'); ?>