I'm trying to achieve this:

I have a static frontpage (defined in index.php) and want a section /blog that uses what I define in page-blog.php but using the built-in methods for looping posts etc.

In reading settings, I have defined the posts to point at the page "blog" which should then reference page-blog.php but all I see is the same as is shown on index.php

Any suggestions on that?



When a page is set to be the page for posts, it ceases to be a "page", and follows a different path in the Template Hierarchy:

By default, WordPress sets your site’s home page to display your latest blog posts. This page is called the blog posts index. You can also set your blog posts to display on a separate static page. The template file home.php is used to render the blog posts index, whether it is being used as the front page or on separate static page. If home.php does not exist, WordPress will use index.php.

  • Thanks for your reply. That makes sense. Do you know what would then be a way to having the posts looped on /blog but not affecting the static frontpage I have now created in index.php? – ask May 4 '18 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.