'widget_portfolio_block', 'description' => __( 'Display portfolio by using specific category', 'ample'), 'customize_selective_refresh' => true, ); $control_ops = array( 'width' => 200, 'height' =>250 ); parent::__construct( false,$name= __( 'TG: Portfolio', 'ample' ), $widget_ops); } function form( $instance ) { $tg_defaults['background_color'] = '#80abc8'; $tg_defaults['background_image' ] = ''; $tg_defaults['attachment' ] = 'scroll'; $tg_defaults['title'] = ''; $tg_defaults['text'] = ''; $tg_defaults['number'] = 4; $tg_defaults['category'] = ''; $tg_defaults['button_text'] = ''; $tg_defaults['button_url' ] = ''; $instance = wp_parse_args( (array) $instance, $tg_defaults ); $background_color = esc_attr( $instance[ 'background_color' ] ); $background_image = esc_url_raw( $instance[ 'background_image' ] ); $attachment = $instance[ 'attachment' ]; $title = esc_attr( $instance[ 'title' ] ); $text = esc_textarea( $instance[ 'text' ] ); $number = $instance['number']; $category = $instance['category']; $button_text = esc_attr( $instance[ 'button_text' ] ); $button_url = esc_url( $instance[ 'button_url' ] ); ?>





id="get_field_id( 'attachment' ); ?>" name="get_field_name( 'attachment' ); ?>" value="scroll" /> id="get_field_id( 'attachment' ); ?>" name="get_field_name( 'attachment' ); ?>" value="fixed" style="margin-left:20px;"/>


' ','name' => $this->get_field_name( 'category' ), 'selected' => $category ) ); ?>

$number, 'post_type' => 'post', 'category__in' => $category ) ); echo $before_widget; $image_style = ''; if ( !empty( $background_image ) ) { $image_style .= 'background-image:url(' . $background_image . ');background-attachment:' . $attachment . ';background-repeat:no-repeat;background-size:cover;'; }else { $image_style .= 'background-color:' . $background_color . ';'; }?>
0 ) : ?>

have_posts() ):$get_featured_posts->the_post(); if ( $i % 4 == 0 ) { $class = 'tg-one-fourth tg-one-fourth-last'; } elseif( $i % 3 == 0 ) { $class= 'tg-one-fourth tg-after-two-blocks-clearfix'; } else { $class = 'tg-one-fourth'; } if ( $i % 2 == 1 ) { $class .= ' '.'tg-column-odd'; } else { $class .= ' '.'tg-column-even'; } ?>