$args = array(
‘numberposts’ => 10,
‘category’ => ‘3’,
‘post_type’ => ‘post’,
);
$posts_list = get_posts( $args );
if( ! empty( $posts_list ) ){
$output = ‘
-
- ‘;
-
- foreach ( $posts_list as $p ){
-
- $output .= ‘
- ‘
. $p->post_title . ‘
- ‘
‘;
}
$output .= ‘
-
-
- ‘;
-
-
-
- }
-