简体   繁体   中英

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

In my index.php, i dont see a body section.

I need to add some code to the body section.

I'm using wordpress theme named: "responsive".

Here is the link for it:

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 themes are located at wp-content/themes/{your-theme-name}/ .

The index.php in web root does not relate to your user interface.

Wordpress is based on php so that means that you won't be writing purely html files. Instead of index.html your main page will be index.php. In index.php you can still write 100% pure html, but you can also mix it with php. In index.html you can't add php code.

You'll find HTML in the theme's .php files. The <body> tag starts in header.php and you'll find </body> in footer.php.

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. Take a look at https://wphierarchy.com/ to learn more about what each theme file does.

Make a backup copy of your theme. Then you can start editing these files to see what they correspond with.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM