WP从每个类别获取具有自定义帖子格式的帖子

I'm trying to get posts from all categories but with one post format, the post format named homePost, I just a beginner in WordPress and I just finished learning the front-end developing and PHP+MySQL developing and I need your help guys :)

Here is my code

<?php $args = array( 'orderby' => 'name', 'parent' => 0 );
$categories = get_categories( $args );
foreach ( $categories as $category ) {

$homePosts = array(
'post_type'=> 'post',
'post_status' => 'publish',
'category'         => $category->cat_ID,
'order' => 'DESC',
'tax_query' => array(
     array(
    'taxonomy' => 'post_format',
    'field' => 'slug',
    'terms' => array( 'homePost' )
    )
    )
);

    $asides = get_posts( $homePosts );
    if ( count($asides) ) {
        foreach ( $asides as $homePosts ) {
            '<p>' + 'Test' + '</p>' ;
        }
    }

}
?>

Hi create a PHP file in the same theme and name your name in it

<?php
        /*
        Template Name: Contact Us
        */
?>

And in admin panel pages in the right hand side there will be like template jus select the template name from the drop down