How Display Posts on category

Question

I had a problem, I converted an html template to wordpress, now I want a section Category Enable to display content using categories Does anyone know the solution and code?
iam use a code and not work for category :

 <?php
            $a = array(
                'posts_per_page'   =>200,
                'offset'           => 0,
                'cat'               => '',
                'category_name'    => '',
                'orderby'          => 'post_date',
                'order'            => 'DESC',
                'include'          => '',
                'exclude'          => '',
                'meta_key'         => '',
                'meta_value'       => '',
                'post_type'        => 'mahsulat',
                'post_mime_type'   => '',
                'post_parent'      => '',
                'post_status'      => 'publish',
                'suppress_filters' => true );

            $the_query=new WP_Query($a);
            while($the_query->have_posts())
            {
                $the_query->the_post();

            ?>

thank

0
kasra abbaszadeh 8 months 2020-11-25T09:10:37-05:00 0 Answers 12 views 0

Leave an answer

Browse
Browse