Home > CMS Tutorial > WordPress > body text

Does wordpress support html?

藏色散人
Release: 2019-07-18 09:26:48
Original
2923 people have browsed it

Does wordpress support html?

Does wordpress support html?

wordpress cannot directly support html, you need to modify xx.html to page-xx .php upload to the theme directory you are currently using, or create a page with the alias xx in the WordPress backend and publish it...

Method 1:

1 . Modify xx.html to page-xx.php and upload it to the theme directory you are currently using;

2. Create a page with the alias xx in the WordPress backend and publish it. You're done.

Note: The created page alias must be the same as page-. Or change xx to your page ID in step 1.

Method 2:

1. Modify xx.html to page-template-xx.php and then add:

<?php
/*
Template Name: xx 页面模板
*/
?>
Copy after login
## to the header of the file. #Then upload it to the theme directory you are currently using;

2. Create a page with the alias xx in the WordPress backend and select the page template as the xx page template created in the first step, then publish it, and you're done. If the page you added is the homepage, you can set this page as the homepage in Settings > Reading > Homepage Display.

About external files such as CSS, JS, and pictures. If your page references CSS, JS, and pictures, such as sample.css, sample.js, and sample.jpg, you can copy these files to the theme. directory, and then change the reference address to:

<link href="<?php echo get_theme_file_uri( &#39;sample.css&#39; ); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo get_theme_file_uri( &#39;sample.js&#39; ); ?>" type="text/javascript"></script>
<img src="<?php echo get_theme_file_uri( &#39;sample.jpg&#39; ); ?>" />
Copy after login
For more WordPress technical articles, please visit the

WordPress Tutorial column!

The above is the detailed content of Does wordpress support html?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template