wordpress - WordPress中的自定义主题不显示任何内容
问题描述
我已经开始学习 WordPress。我的自定义主题不显示任何内容。以下是代码。
样式.css
/*
Theme Name: My First Theme
Theme URI: http://localhost/wordpress/
Author: Itsmee
Author URI: https://abcd.com
Description: Basic WordPress theme for Sitepoint theme building tutorial
Text Domain: bsimple
Version: 1.0.0
License: GNU General Public License v2 or later
*/
索引.php
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @package My_First_Theme
*/
get_header();
?>
//content HTML here
<?php get_footer(); ?>
头文件.php
<?php wp_head(); ?>
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Bootstrap Template - Index</title>
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700|Raleway:300,400,400i,500,500i,700,800,900" rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/icofont/icofont.min.css" rel="stylesheet">
<link href="assets/vendor/animate.css/animate.min.css" rel="stylesheet">
<link href="assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="assets/vendor/nivo-slider/css/nivo-slider.css" rel="stylesheet">
<link href="assets/vendor/owl.carousel/assets/owl.carousel.min.css" rel="stylesheet">
<link href="assets/vendor/venobox/venobox.css" rel="stylesheet">
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet">
</head>
页脚.php
<?php wp_footer(); ?>
//Footer scripts and other contents
成功创建主题并在后端激活它但是在前端看不到任何东西似乎主题文件没有呈现。
请帮忙!谢谢。
解决方案
推荐阅读
- java - 收到致命警报:handshake_failure webservice
- javascript - 格选择开关
- r - 是否可以在 R 中使用/运行/调用 Modelica FMI 模型?
- python - 从 Path2D 中查找多边形的属性,派生自 Python 中 Trimesh 模块的 .to_planar() 函数
- python - 在 Python 中从 PrivateKey/CertificateRequest/Certificate 中提取公钥模数,格式与 OpenSSL 相同
- sql-workbench-j - 如何更改 SQL Workbench/J 中的活动数据库连接?
- django - 如何在 django 中编辑或修改我的布尔字段
- javascript - JS 插入字符串 ${ }
- react-native - Moment JS 看似返回随机日期
- vba - VBA:通过 HTTPS 下载图片