wordpress 首页模板变量对应表
最近开始学习wp,这里做一些笔记。
首页模板,第一行为前台显示的html代码。第二行为 wp-content/themes/模板目录 下 head.php文件中。
其中我将变量名 html用绿色标记 php代码用红色标记
语言格式
<html lang="zh-CN">
<html <?php language_attributes(); ?>>
页面编码
<meta charset="UTF-8" />
<meta charset="<?php bloginfo( 'charset' ); ?>" />
页面标题
<title>谢寒博客 | 又一个WordPress站点</title>
<title> <?php wp_title( '|', true, 'right' ); ?> </title>
发布街口
<link rel="pingback" href="http://localhost/blog/xmlrpc.php" />
<link rel="pingback" href=" <?php bloginfo( 'pingback_url' ); ?> " />
目录地址:
<script src="http://localhost/blog/wp-content/themes/twentytwelve/js/html5.js" type="text/javascript"></script>
<script src=" <?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
css和js地址
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://localhost/blog/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://localhost/blog/wp-includes/wlwmanifest.xml" />
<meta name="generator" content="WordPress 3.6" />
<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
<style type="text/css" media="print">#wpadminbar { display:none; }</style>
<style type="text/css" media="screen">
html { margin-top: 28px !important; }
* html body { margin-top: 28px !important; }
</style>
<?php wp_head(); ?>
body class
<body class="home blog logged-in admin-bar no-customize-support custom-font-enabled single-author" >
<body <?php body_class(); ?> >
标题部分
<h1 class="site-title">
<a href="http://localhost/blog/"
title="站点标题" rel="home">
站点标题</a></h1>
<h1 class="site-title">
<a href=" <?php echo esc_url( home_url( '/' ) ); ?> "
title=" <?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> " rel="home">
<?php bloginfo( 'name' ); ?> </a></h1>
副标题
<h2 class="site-description">又一个WordPress站点</h2>
<h2 class="site-description"> <?php bloginfo( 'description' ); ?> </h2>
菜单
<h3 class="menu-toggle">菜单</h3>
<h3 class="menu-toggle"> <?php _e( 'Menu', 'twentytwelve' ); ?></h3>
跳至内容
<a class="assistive-text" href="#content" title=" 跳至内容">跳至内容</a>
<a class="assistive-text" href="#content" title=" <?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?> </a>
导航栏
<div class="nav-menu"><ul><li class="current_page_item"><a href="http://localhost/blog/" title="首页">首页</a></li><li class="page_item page-item-2"><a href="http://localhost/blog/?page_id=2">示例页面</a></li></ul></div>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
wordpress 首页模板变量对应表的更多相关文章
- Pycharm文档模板变量
点击这里查看JetBrains官方英文源文件 本篇Blog只是搬运外加大概翻译一下. File template variables A file template can contain varia ...
- phpcms V9 首页模板文件解析
在了解了<phpcms V9 URL访问解析>之后,我们已经知道首页最终执行的是content模块下index控制器的init方法. 下面, 我们逐步分析过程如下: 第一.首页默认执行的是 ...
- phpcms V9 首页模板文件解析(转)
转自:http://www.cnblogs.com/Braveliu/p/5100018.html 转在了解了<phpcms V9 URL访问解析>之后,我们已经知道首页最终执行的是con ...
- WordPress主题模板层次和常用模板函数
首页: home.php index.php 文章页: single-{post_type}.php – 如果文章类型是videos(即视频),WordPress就会去查找single-videos. ...
- 黄聪:wordpress源码解析-数据库表结构(转)
如果是一个普通的用户,不需要了解wordpress数据库的结构.但是,如果你正在写一个插件,你应该会对wordpress如何处理它的数据和关系感兴趣.如果你已经尝试使用已经存在的wordpress a ...
- smarty模板做人员表信息删除,修改 里面的性别单选按钮民族下拉,另外登录进去可以显示姓名
首先登录进去可以显示姓名 smarty模板做人员表信息删除,删除的时候有提示框确定删除吗. 修改 里面的性别单选按钮,要修改谁有默认选中,用了变量调节器 民族位置做下拉,用<{foreach}& ...
- cmake 常用变量和常用环境变量查表手册
cmake 常用变量和常用环境变量查表手册 一,cmake 变量引用的方式: 前面我们已经提到了,使用${}进行变量的引用.在 IF 等语句中,是直接使用变量名而不通过${}取值 二,cmake 自定 ...
- 如何处理wordpress首页不显示指定分类文章
如何实现wordpress首页不显示指定分类文章,要实现这一步,首先必须找到需要屏蔽的该目录的id,那么如何查看wordpress的分类id呢?有两种方法: 通过wordpress后台查看分类的ID ...
- (转)WordPress常用模板函数 修改或自制WordPress主题必备
对于很多WordPress新手来说,不懂任何代码的情况下去瞎改WordPress主题,得出的效果往往会出现语法错误之类的东西或效果不尽人意.想要修改 WordPress主题模板文件最基本的当然要懂得H ...
随机推荐
- 指针和Const限定符
指针和Const限定符 1.指向const对象的指针 如果指针指向的是const对象,则不允许使用指针来改变其所指的const值.C++要求指向const对象的指针具有const特性. const d ...
- 利用CSS3的transform 3D制作的立方体旋转效果
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
- SQL学习之汇总数据之聚集函数
一. 1.我们经常需要汇总数据而不用把他们实际检索出来,为此SQL提供了专门的函数,以便于分析数据和报表生成,这些函数的功能有: (1)确定表中行数(或者满足单个条件或多个条件或包含某个特定值的行数) ...
- 在WHERE子句中引用取别名的列
版权说明:作者:张颖希(PocketZ's Blog)出处:http://www.cnblogs.com/PocketZ本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页 ...
- Ubuntu常用命令整理
最近开始用Ubuntu系统了,各种命令很不熟练,想收集一下,以便以后查阅,用这个时常更新的随笔 1.Ubuntu设置与修改用户密码 设置ROOT密码方法:sudo passwd root ,然后输入密 ...
- Android 创建目录
//android 内部存储自定义目录写入文件 try{ File testDir = new File(this.getFilesDir().getAbsolutePath() + File.sep ...
- sql查询当天数据
向数据库中添加日期 MS SQL SERVER: NSERT into student(studentid,time1)values('15',getdate()); MY SQLinsert int ...
- 使用 UML 进行业务建模:理解业务用例与系统用例的相似和不同之处
使用 UML 进行业务建模:理解业务用例与系统用例的相似和不同之处 作者:Arthur V. English 出处:IBM 本文内容包括: 背景 业务用例模型与系统用例模型有什么相似之处? 业 ...
- setTimeOut和setInterval详解
setTimeout和setInterval的语法相同.它们都有两个参数,一个是将要执行的代码字符串,还有一个是以毫秒为单位的时间间隔,当过了那个时间段之后就将执行那段代码.不过这两个函数还是有区别的 ...
- 升级python的sqlite库版本
今天了解了一下用python获取chrome cookie信息,在研究的过程中,发现打开数据库失败,后来调查了一下发现是由于sqlite3库太老的缘故,起码需要3.8以上,然后看了一下python 2 ...