__( 'Choose between 1 of 5 ways to display a custom category of posts.', 'lycanthropy' ), )
);
}
// Front-end Widget
public function widget( $args, $instance ) {
$title = apply_filters( 'widget_title', $instance['title'] );
$category_id = $instance['category_id'];
$type = $instance['type'];
$num_posts = absint( $instance['num_posts'] );
$post_offset = absint ( $instance['post_offset'] );
global $post;
////////////////////////////// LISTA //////////////////////////////
if($type == 'lista') :
echo $args['before_widget'];
if ( $title )
echo $args['before_title'] . $title . $args['after_title'];
$cats_to_include = ( $category_id ) ? "cat={$category_id}&": '';
$num_posts_query = new WP_Query( "{$cats_to_include}showposts={$num_posts}&offset={$post_offset}" );
if( $num_posts_query->have_posts()) : ?>
have_posts()) : $num_posts_query->the_post();
update_post_caches($posts); ?>
get_field_name( 'category_id' ).'&class=widefat'); ?>