WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] clarification about template hierarchy

[Resolved] clarification about template hierarchy

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you have a home.php file that will be the first that appears, unless you nominate a specific page in the settings

    If you don’t have a home page then the index.php file will be the first that appears…

    If you have a 404 error (like a wrong typo) then the 404.php will appear first… if no 404.php then the index.php will appear.

    In essence the index.php is the last resort fall back if the ‘higher’ xyz.php isn’t present.

    I have /understood/ the flow chart in horizontal way.
    But in my opinion the /vertical/ way is /not/ clear.
    You have not answered to my doubt.
    Which is the order conditions are tested?
    1) is_home
    2) is_404
    3) is_search
    4) and so on
    or another one?

    In 2.9.2 look at wp-includes/template-loader.php for that.

    Perfect, thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] clarification about template hierarchy’ is closed to new replies.
Skip to toolbar