*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Adens News
*/
?>
>
>
'name',
'order' => 'ASC'
) );
foreach( $categories as $category ) {
$category_link = sprintf(
'%3$s',
esc_url( get_category_link( $category->term_id ) ),
esc_attr( sprintf( __( 'View all posts in %s', 'textdomain' ), $category->name ) ),
esc_html( $category->name )
);
echo '' . sprintf( esc_html__( '%s', 'textdomain' ), $category_link ) . '
';
}
?>
Latest News
5,
'post_type' => 'post',
);
$latest_posts = new WP_Query($args);
$count = 0;
while ($latest_posts->have_posts()): $latest_posts->the_post();
if($count == 0):
?>
Featured
5,
'post_type' => 'post',
'category_name' => 'featured',
);
$featured = new WP_Query($newargs);
?>
have_posts()): $featured->the_post();
?>