Answer the question
In order to leave comments, you need to log in
Why isn't the list of WP posts displayed?
I have a blog page, it has its own template:
Here is the template code:
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
the_title();
// get_template_part( 'template-parts/content', 'posts' );
endwhile; // End of the loop.
endif;
Answer the question
In order to leave comments, you need to log in
it doesn't work that way. Please note that when you assign your page as a blog page, you lose the choice of template and the ability to edit it.
At this point the template starts using index.php or if there is home.php.
If you want to use a template with a different name for your blog, such as page-blog.php, then don't designate it as your post page. leave it as it was - Select
Hello!
Install the Query Monitor plugin and see what template is connected when viewing the page
. I hope the blog template is named correctly? If not, then read the WP code, the template hierarchy, and the theme development thread.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question