Well, I wanted to know what function I use to display all the articles in my blog in a theme I'm creating, I've already reviewed the internet and found nothing. would it be with a get_posts?
Well, I wanted to know what function I use to display all the articles in my blog in a theme I'm creating, I've already reviewed the internet and found nothing. would it be with a get_posts?
Use the code below:
get_header();
if (have_posts()):
foreach ($posts as $post) : setup_postdata($post);
the_title();
endforeach; // foreach($posts
wp_reset_postdata();
endif;
get_footer();