[英]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.