您可以在主题中放置自定义页面模板:在主题中创建“模板”文件夹并放置页面。首先,检查管理面板并在“页面属性”中创建新的页面显示模板名称,如:
如果不是,则打开
archive.php
在此行中:
<?php
/**
* The template for displaying Archive pages
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* If you\'d like to further customize these archive views, you may create a
* new template file for each specific one. For example, Twenty Thirteen
* already has tag.php for Tag archives, category.php for Category archives,
* and author.php for Author archives.
*
* @link http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
*/
Replace This Line
<?php
/*
Template Name: About Us
*/
并刷新管理面板,创建新页面。
记住,对于所有创建的自定义页面模板,请确保编写代码:
<?php
/*
Template Name: Contact Us
*/