'geocraft_widget_archive', 'description' => __('A monthly archive of your site’s posts or custom pots')); parent::__construct('geocraft_archives', __('Geocraft Archives'), $widget_ops); } function widget($args, $instance) { extract($args); $c = !empty($instance['count']) ? '1' : '0'; $d = !empty($instance['dropdown']) ? '1' : '0'; $title = apply_filters('widget_title', empty($instance['title']) ? __('Archives') : $instance['title'], $instance, $this->id_base); if (!$show_type = $instance["show_type"]) $show_type = 'post'; echo $before_widget; if ($title) echo $before_title . $title . $after_title; $my_args = array( 'post_type' => $show_type ); $c_posts = new WP_Query($my_args); if ($c_posts->have_posts()): $c_posts->the_post(); if ($d) { ?>
id="get_field_id('dropdown'); ?>" name="get_field_name('dropdown'); ?>" />
id="get_field_id('count'); ?>" name="get_field_name('count'); ?>" />