Meanwhile, I have implemented some features of bootScore. And I’ve promptly overloaded my site, as my reader says: She recaps, that I — as far as she has understood — want to flexibly write about several different core topics. This would end up in a listed mishmash, of course! Shall she herself pick out what belongs together?
Why does my homepage offer her such a long list of posts anyway? Why couldn’t she just see the most important things first? Couldn’t she call up the ‘search tools’ from the menu at all? In one fell swoop? And when she needs them, and not when the site means she does? Yes, she is right, my lovely reader! As usual! So let’s reduce our structure:
Solution
- Create a page
mylap
via the WordPress backend (= my landing page) - Create a page
myplp
via the WordPress backend (= my post list page) - Copy the
index.php
from bootScore-main under the namemylap.php
into your Cild-Theme. - In the file
mylap.php
change the lineThe main template file
toTemplate Name: mylap (my landing page)
. - Also, insert a specific name in the file
home.php
viaTemplate Name: myplp (my post list page)
. - Activate the button
a static page
onSettings/Reading/Your homepage displays
, assign the page mylap to the entry Homepage, and the page myplp to the entry Posts page - Edit the page
mylap
in the WordPress backend and replace Default Template in Page options with the template mylap. - Add the created page
myplp
to YourAppearance/Menus
.
Background
So, you offer your reader the option to call up an overview of all your posts from the menu: The added menu entry — literally directing to myplp
— is now redirected to home.php
by WordPress.
But if you call your site URL / domain, WordPress does not display home.php anymore, but the page mylap
. As a derivative of the bootSCore-index.php, it also still displays a list of your posts. But — in the next step — you are free to design this page as your landing page — in the way you want. Without limiting the functionality of your page. More about that later.
Here are some traps you can avoid:
- If you don’t give your
php
files unique template names, you will despair when assigning the WordPress pagemylap
and the templatemylap.php
. - If you also assign the template
home.php
with the template namemyplp
to the WordPress pagemyplp
, you will confuse WordPress: When you call the page myplp from the menu, WordPress organizes the filehome.php
by itself without any further work. You have already organized this with the assignment underSettings/Reading/Your homepage displays
.