/home/techb158/public_html/wp-content/themes/engitech/inc/frontend/widgets
Edit: /home/techb158/public_html/wp-content/themes/engitech/inc/frontend/widgets/recent-posts.php (5893B)
esc_html__( 'OT Recent Posts', 'engitech' ), )
);
}
// This is where the action happens
public function widget( $args, $instance ) {
// these are the widget options
//$title = apply_filters( 'widget_title', $instance['title'] );
$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? esc_html__( 'Latest News', 'engitech' ) : $instance['title'], $instance, $this->id_base );
$date = ! empty( $instance['count'] ) ? '1' : '0';
// before and after widget arguments are defined by themes
echo htmlspecialchars_decode($args['before_widget']);
if ( ! empty( $title ) ){
echo htmlspecialchars_decode($args['before_title']) . $title . htmlspecialchars_decode($args['after_title']);
}?>
$instance['posts_per_page'],
'no_found_rows' => true,
'post_status' => 'publish',
'ignore_sticky_posts' => true,
),
$instance
)
);
if ( ! $r->have_posts() ) {
return;
}
foreach ( $r->posts as $recent_post ) : ?>
ID );
$post_thumb = get_the_post_thumbnail( $recent_post->ID, 'thumbnail' );
$title = ( ! empty( $post_title ) ) ? $post_title : __( '(no title)' );
?>
-