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 ...
随机推荐
- ubuntu 64位设置兼容32位 for ADB 命令无法运行
在虚拟机上Ubuntu系统里安装ADT开发工具,配置好环境后导入Android工程报错: 找不到Adb命令: ubuntu 12.04 64位设置兼容32位的实现REF:http://www.2cto ...
- SET ANSI_NULLS (Transact-SQL)
指定在 SQL Server 2014 中与 Null 值一起使用等于 (=) 和不等于 (<>) 比较运算符时采用符合 ISO 标准的行为. 当 SET ANSI_NULLS 为 ON ...
- C++中的unordered_map
1.简介 随着C++0x标准的确立,C++的标准库中也终于有了hash table这个东西.很久以来,STL中都只提供<map>作为存放对应关系的容器,内部通常用红黑树实现,据说原因是二叉 ...
- (4)事件处理——(2)在页面加载的时候执行任务(Performing tasks on page load)
We have already seen how to make jQuery react to the loading of a web page. The $(document).ready()e ...
- IE8,9下的ajax缓存问题
最近在做一个网站的登录注册框,前端使用了jquery.由于sign和login不是在单独的页面上,而是以一个弹出框出现.所以决定使用ajax来实现注册和登录功能.本以为可以一帆风顺,结果在测试的时候发 ...
- IronPython初体验和实战集合等类型转换和类型匹配
人老了,做什么都累~学到了这么多技术,从最早C到C++再到JAVA再到C#,最终都是为了改善产品,改善系统的可维护性.众所周知C#,C++,C都是强类型语言,什么情况都得定义一些实体类来改变业务模型, ...
- SQL Server 排名函数实现
在SQL Server 中有四大排名函数分别是: 1.row_number() 2.ntile() 3.rank() 4.dense_rank() -------------------------- ...
- rsyslog 不打印日志到/var/log/messages
*.info;mail.none;authpriv.none;cron.none;local3.none /var/log/messages 表示 所有来源的info级别都记录到/var/log/me ...
- HDU 5054 Alice and Bob
#include <cstdio> int main(){ int n,m,x,y; while(~scanf("%d%d%d%d",&n,&m,&am ...
- document.domain - JavaScript的同源策略问题:错误信息:Permission denied to access property 'document'_eecc00_百度空间
document.domain - JavaScript的同源策略问题:错误信息:Permission denied to access property 'document'_eecc00_百度空间 ...