query('showposts=1&orderby=rand'); $random_post_id = ''; if ($randomPostQuery->have_posts()) { $random_comic_id = get_the_ID(); } if ($randomic_post_id) wp_redirect( get_permalink( $random_post_id ) ); exit; } class easel_random_post_link_widget extends WP_Widget { function easel_random_post_link_widget($skip_widget_init = false) { if (!$skip_widget_init) { $widget_ops = array('classname' => __CLASS__, 'description' => __('Displays a link to click to trigger a random blog post.','easel') ); $this->WP_Widget(__CLASS__, __('Random Post Link','easel'), $widget_ops); } } function widget($args, $instance) { global $post; extract($args, EXTR_SKIP); echo $before_widget; $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; ?>

'' ) ); $title = strip_tags($instance['title']); ?>