简体   繁体   English

我没有 index.html,我有 index.php。 我的代码去哪里了?

[英]I dont have index.html, I have index.php. Where does my code go?

I know i might get downvoted for asking this but i really need to know:我知道我可能会因为问这个问题而被否决,但我真的需要知道:

I have index.php and no index.html我有 index.php 没有 index.html

In my index.php, i dont see a body section.在我的 index.php 中,我没有看到正文部分。

I need to add some code to the body section.我需要在正文部分添加一些代码。

I'm using wordpress theme named: "responsive".我正在使用名为“响应式”的 wordpress 主题。

Here is the link for it:这是它的链接:

https://en-ca.wordpress.org/themes/responsive/ https://en-ca.wordpress.org/themes/responsive/

I would really appreciate it if someone could have a look and let me know where i can find the section.如果有人可以看看并告诉我在哪里可以找到该部分,我将不胜感激。

Thanks谢谢

First, learn how to use WordPress.首先,学习如何使用WordPress。 WordPress themes are located at wp-content/themes/{your-theme-name}/ . WordPress 主题位于wp-content/themes/{your-theme-name}/

The index.php in web root does not relate to your user interface. web root 中的index.php与您的用户界面无关。

Wordpress is based on php so that means that you won't be writing purely html files. Wordpress 基于 php,这意味着您不会编写纯 html 文件。 Instead of index.html your main page will be index.php.您的主页将是 index.php,而不是 index.html。 In index.php you can still write 100% pure html, but you can also mix it with php.在 index.php 中,您仍然可以编写 100% 纯 html,但您也可以将其与 php 混合使用。 In index.html you can't add php code.在 index.html 中你不能添加 php 代码。

You'll find HTML in the theme's .php files.您将在主题的 .php 文件中找到 HTML。 The <body> tag starts in header.php and you'll find </body> in footer.php. <body>标记在 header.php 中开始,您将在 footer.php 中找到</body>

There will also be an index.php, and/or front-page.php, and/or home.php file, but those aren't necessarily going to match up to your experience with index.html files -- they're used to output the content of your website's homepage, the blog page, or archives pages like category pages.还会有一个 index.php 和/或 front-page.php 和/或 home.php 文件,但这些文件不一定与您对 index.html 文件的体验相匹配——它们被使用输出网站主页、博客页面或分类页面等档案页面的内容。 Take a look at https://wphierarchy.com/ to learn more about what each theme file does.查看https://wphierarchy.com/以了解有关每个主题文件功能的更多信息。

Make a backup copy of your theme.制作主题的备份副本。 Then you can start editing these files to see what they correspond with.然后您可以开始编辑这些文件以查看它们对应的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Index.php代替Index.html,如何访问,我显然必须更改的.htaccess文件在哪里? - Index.php instead Index.html, how to access, and where is the .htaccess file that i have apparently have to change? 对于以表单结尾的单页网站:是否必须将index.html转换为index.php? - For a Single-Page-Website with a form at the end: Do I have to convert the index.html into index.php? 为什么index.html优先于index.php? - Why does index.html have priority over index.php? 当我有PHP包含时,命名索引页面php或html - Naming index page php or html when i have a php include index.html是必需的,但是我正在使用php - index.html necessary but I'm using php 我创建了一个html提交按钮,并与php代码连接,但是,选择之后,我该如何返回我的html页面? - I have created one html submit button and connects with php code but, after selecting that how can i go back my html page? 如何在使用PHP Slim REST Api时提供index.html文件? - How do I serve my index.html file while using PHP Slim REST Api? 我如何在没有Index.html或.php的情况下将WebApplication文件运行到服务器? - How can I run my WebApplication files to the server without an Index.html or.php? 在index.php / index.html文件中隐藏JavaScript代码 - Obscure JavaScript code in index.php/index.html files 如何从index.html在私有文件夹中运行index.php - How do I run index.php in a private folder from index.html
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM