admin管理员组文章数量:1201374
I've inherited a theme and am trying to get my head around a plugin failure.
There is an index.php file in the root of the theme, is that the first file wordpress will look at when it attempts to resolve the homepage or maybe it is something else?
All files in the the root are as follows:
404.php
archive-jetpack-testimonial.php
archive.php
assets
comments.php
footer.php
front-page.php
functions.php
header-front.php
header.php
inc
index.php
page.php
rtl.css
screenshot.png
search.php
secure.php
sidebar.php
single.php
style.css
style.css.map
template--standard.php
With which file does wordpress begin?
I've inherited a theme and am trying to get my head around a plugin failure.
There is an index.php file in the root of the theme, is that the first file wordpress will look at when it attempts to resolve the homepage or maybe it is something else?
All files in the the root are as follows:
404.php
archive-jetpack-testimonial.php
archive.php
assets
comments.php
footer.php
front-page.php
functions.php
header-front.php
header.php
inc
index.php
page.php
rtl.css
screenshot.png
search.php
secure.php
sidebar.php
single.php
style.css
style.css.map
template--standard.php
With which file does wordpress begin?
Share Improve this question asked Sep 7, 2018 at 17:22 SeanJSeanJ 1671 silver badge8 bronze badges 2 |2 Answers
Reset to default 5If it's the home page, WordPress will look for the following files in this order and use the first one it finds:
1. front-page.php
2. home.php
3. index.php
WordPress template hierarchy is described in detail here:
https://developer.wordpress.org/themes/basics/template-hierarchy/
This article explains how WordPress determines which template file(s) to use on individual pages. If you want to customize an existing WordPress theme it will help you decide which template file needs to be edited.
I think the more logical path is this:
- style.css
- functions.php
- index.php
本文标签: What is the first file wordpress looks at in a theme
版权声明:本文标题:What is the first file wordpress looks at in a theme? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738546237a2096470.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
style.css
to determine the name of the theme and whether it's a child theme, and whether it's the theme that the blog is configured to use. – Michael Hampton Commented Sep 7, 2018 at 23:02