仅显示一个类别的帖子(功能修改)

I would like to display post from only one category. How should I change this function?

<?php

                $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
                $args = array('post_type' => 'post','paged' => $paged);
                query_posts($args); 

                if ( have_posts() ) :
                    while ( have_posts() ) : the_post();
                        get_template_part( 'post-format/content', get_post_format() );
                    endwhile;
                else:
                    get_template_part( 'post-format/content', 'none' );
                endif;

                ?>
<?php
/*
Template Name: Boats'n'Hoes
*/
?>
<?php get_header(); ?>
<div id="main">
<div id="content" class="narrowcolumn">

<?php
query_posts('cat=1');
while (have_posts()) : the_post();
the_content();
endwhile;
?>

</div>

<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>

reference :- https://wordpress.org/support/topic/display-the-posts-of-one-category-in-a-page-solved

Something I created for a client was a template that lists posts from a category that has the same name as the page. So, create a Page called "funnies" if you want to list all posts in the "technology" category. Oh, and the original content of the Page is displayed too, if you need an introductory text.

<?php /*
Template Name: ListPostsInCategoryThatHasSameNameAsPage
*/ ?>

<?php get_header(); ?>

<div id="content">
<div id="main">

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <h1><?php the_title(); ?></h1>
        <?php the_content(); ?>
    <?php endwhile; else: endif; ?>

    <?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    <p><?php the_content(); ?>
    <?php endwhile; else: endif; ?>

</div>
</div>

<?php get_footer(); ?>

Pass this with $args

'category_name'    => 'cat-name',