给Wordpress自定义页面模板出现编辑器的标题 [英] Give Wordpress custom page template a title for appearnce editor

查看:215
本文介绍了给Wordpress自定义页面模板出现编辑器的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在Wordpress主题外观编辑器中,某些页面有一个整齐的标题显示在您的主题文件的右侧列表中。例如,page.php显示为页面模板。这是干净,容易阅读。

When in Wordpress theme appearance editor, certain pages have a neat titles displayed in the right hand list for your theme files.For example page.php shows as "Page Template". This is clean and easily read.

Wordpress用于为自定义页面模板提供这些标题的注释语法吗?

Is there any comment syntax that Wordpress uses to give these titles for my custom page template?

,我的single-video.php页面可以是视频页面模板。

For example, my single-video.php page could be "Video Page Template".

推荐答案

确保您的网页打开时包含以下内容:

Yes you can. Make sure your page opens with something like:

<?php /** Template Name: Text & Image 
*/ get_header(); ?>

在这种情况下,文件概述中的文件名称(在外观编辑器中):文本&图片页面模板

In this case the name of the file in your file overview (while in your appearance editor): Text & Image Page Template

这篇关于给Wordpress自定义页面模板出现编辑器的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆