'alpha_widget', 'description' => 'Include an testimonial sidebar carousel' );
$this->WP_Widget('alpha_widget', 'Alpha Testimonials Widget', $widget_ops);
}
function widget($args, $instance) {
extract($args);
echo $before_widget;
$title = $instance['widg_title'];
$autoplay = $instance['widg_autoplay'];
$delay = $instance['widg_delay'];
$title_clr = $instance['widg_title_clr'];
$text = $instance['widg_text'];
$args = array(
'post_type' => 'tf_testimonials',
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC',
'status' => 'publish'
);
$testimonials = get_posts( $args );
if( $testimonials ):
?>
' ) : '' ); ?>
ID ) ){
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $testimonial->ID ), 'customer-thumb' );
}
$title = get_post_meta( $testimonial->ID, 'alpha_title', true ) ? get_post_meta( $testimonial->ID, 'alpha_title', true ) : '';
$company = get_post_meta( $testimonial->ID, 'alpha_company', true ) ? get_post_meta( $testimonial->ID, 'alpha_company', true ) : '';
$url = get_post_meta( $post->ID, 'alpha_url', true ) ? get_post_meta( $post->ID, 'alpha_url', true ) : '';
?>
-
ID, 'tf_testimonial_content', true ); ?>
ID, 'alpha_name', true ) ) echo get_post_meta( $testimonial->ID, 'alpha_name', true ); ?>
' . $company . ''; ?>
'Testimonials',
'widg_title_clr' => 'lightgrey',
'widg_autoplay' => 'on',
'widg_text' => '#fafafa',
'widg_delay' => 3500
) );
$title = strip_tags($instance['widg_title']);
$title_clr = $instance['widg_title_clr'];
$text = $instance['widg_text'];
$title_clr = $instance['widg_title_clr'];
$delay = $instance['widg_delay'];
$autoplay = $instance['widg_autoplay'];
?>