Create Static Site in wordpress
I have static html website and want to recreate it in wordpress. The static website have aboutus and some other section in home page. So i decided to make this section as post and style it. First in wpbeginner i learn that have to create single folder and create theme parts to style each post differently. And i also get this code
<?php $catquery = new WP_Query( 'category_name=about'); ?> <ul> <?php while($catquery->have_posts()) : $catquery->the_post(); ?> <h1><?php the_title(); ?></h1> <h1><?php the_content(); ?></h1> <?php endwhile; wp_reset_postdata(); ?>
my question is did i do in correct method and what is difference between single folder’s theme-parts code and the code above which i apply in index.php?