esc_html__( 'BlogHub recent posts widget', 'bloghub' ),
) );
}
public function widget( $args, $instance ) {
?>
'post',
'posts_per_page' => $post_count,
'ignore_sticky_posts' => true,
'order' => $post_order,
'order_by' => $order_by,
'tax_query' => array(
array(
'taxonomy' => 'category',
'terms' => $category,
),
),
) );
} else {
$resent_post = new WP_Query( array(
'post_type' => 'post',
'posts_per_page' => $post_count,
'ignore_sticky_posts' => true,
'order' => $post_order,
'orderby' => $order_by,
) );
}
while ( $resent_post->have_posts() ): $resent_post->the_post(); ?>
- >