I’d like to build a website with a home (static) page and a separate page for the blog posts, like this:
my_domain_name.com/ goes to a static home page
my_domain_name.com/blog goes to the blog page, with the main loop.
I have exported the static page as index.php and the blog page as front-page.php. Wordpress shows the blog page but ignores the static home page I’ve created.
How should I export these files so that WP understands the behavior I’m looking for?
In WP Setting > Reading, I pointed the home do Home and the posts page to Blog.
The posts page I exported on Pinegrow as home.php.
The static home page I exported both as front-page.php and index.php.
It’s working. When I point to / it shows the static page I wanted and when I point to /blog it shows the posts page. However, I don’t really know which .php file the WP is using to render the static home page.
It doesn’t sound right to have both front-page.php and index.php with the same content.
@Dimitri85 You don’t need to export the static homepage as front-page.php and index.php. WordPress will look for front-page.php first, but if you don’t export as front-page.php, it will use index.php, so either will work. Which one you use depends on whether the static page is unique among all the site pages (for example, having an unusual header), in which case I’d assign it to front-page.php. Because index.php is the fallback template for all pages, you wouldn’t want to assign an odd-looking page to it.