L
L
Lev Aleksandrov2021-08-03 17:41:56
WordPress
Lev Aleksandrov, 2021-08-03 17:41:56

How to display posts on a separate page (not on the main page)?

Here on Habré and not only this question was asked and many more where it was explained.
But I don't understand why it doesn't work for me.
I created index.php and page-posts.php (template).
I go to the admin panel, create 2 pages: Main and Publications (I choose the page-posts.php template).
In the reading settings, I specify that the main page will be the static page "Home", and for the records I select "Publications".
I go to the "Publications" page and my main page opens. What is the problem?
I'm clearly missing something. Help understand.
6109551eaa2d0896139858.png
6109552de8bdf584549366.png
610955722a5d8858474396.png
6109557757bfe248807810.png
index.php
6109558e5c761295619887.png
file: page-posts.php file (it differs internally):
6109559b51e9d295753337.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Zolin, 2021-08-03
@h3ckphy

I don't know where you get all this from, but index.php is not the main one. index.php is the most basic template, it's used when WP can't find any other suitable
one For the main one you need to use front-page.php or home.php and the default template is generally page.php
Read the template hierarchy for details

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question