Home >CMS Tutorial >WordPress >Does wordpress support html?

Does wordpress support html?

藏色散人
藏色散人Original
2019-07-18 09:26:482954browse

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 页面模板
*/
?>
## 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; ); ?>" />

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!

Statement:
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