Post actualizado el día September 27, 2026 by DeiviSanzPlay
My problem was when designing a website. I told the something misconfigured. Then it dawned on me.
It’s the -travel one. .
category. php. archive. php, which is used for archives in general. for each room ( (block themes), the most modern ones. The logic is the same, but the pieces change: - The files are no longer
. php, they are . html. They contain blocks, not complex PHP code. - They don't go loose in the main folder, but in a subfolder called
/templates/. - Here's a twist: WordPress can save templates directly in the database. If you create a custom template from the site editor, it gets saved there and has maximum priority, above any
. html file in the folder.
That last point is a double-edged sword. It's powerful because you can modify designs without touching files, but it can also cause confusion. Your change isn't showing? Check if there's a "custom" template saved in the database that's taking control.
If you use a child theme to make modifications without breaking the main theme, the hierarchy doubles. WordPress will first check if the file it's looking for (for example, single. php) exists in the child theme's folder. If it's there, it uses it and that's that. If not, then it goes looking for it in the parent theme. This gives you control, but it also means that sometimes the parent theme can have a more specific template (like single-recipe. php) that overrides your generic single. php in the child theme.
In the end, understanding this is what separates "shooting in the dark" from "fixing it with judgment". It's not black magic, it's a predictable system. The next time a page doesn't look the way you expect, ask yourself: what file will WordPress be looking for in its hierarchy, and which one does it actually find first? That's usually where the crux of the matter lies.