最近开始学习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 首页模板变量对应表的更多相关文章

  1. Pycharm文档模板变量

    点击这里查看JetBrains官方英文源文件 本篇Blog只是搬运外加大概翻译一下. File template variables A file template can contain varia ...

  2. phpcms V9 首页模板文件解析

    在了解了<phpcms V9 URL访问解析>之后,我们已经知道首页最终执行的是content模块下index控制器的init方法. 下面, 我们逐步分析过程如下: 第一.首页默认执行的是 ...

  3. phpcms V9 首页模板文件解析(转)

    转自:http://www.cnblogs.com/Braveliu/p/5100018.html 转在了解了<phpcms V9 URL访问解析>之后,我们已经知道首页最终执行的是con ...

  4. WordPress主题模板层次和常用模板函数

    首页: home.php index.php 文章页: single-{post_type}.php – 如果文章类型是videos(即视频),WordPress就会去查找single-videos. ...

  5. 黄聪:wordpress源码解析-数据库表结构(转)

    如果是一个普通的用户,不需要了解wordpress数据库的结构.但是,如果你正在写一个插件,你应该会对wordpress如何处理它的数据和关系感兴趣.如果你已经尝试使用已经存在的wordpress a ...

  6. smarty模板做人员表信息删除,修改 里面的性别单选按钮民族下拉,另外登录进去可以显示姓名

    首先登录进去可以显示姓名 smarty模板做人员表信息删除,删除的时候有提示框确定删除吗. 修改 里面的性别单选按钮,要修改谁有默认选中,用了变量调节器 民族位置做下拉,用<{foreach}& ...

  7. cmake 常用变量和常用环境变量查表手册

    cmake 常用变量和常用环境变量查表手册 一,cmake 变量引用的方式: 前面我们已经提到了,使用${}进行变量的引用.在 IF 等语句中,是直接使用变量名而不通过${}取值 二,cmake 自定 ...

  8. 如何处理wordpress首页不显示指定分类文章

    如何实现wordpress首页不显示指定分类文章,要实现这一步,首先必须找到需要屏蔽的该目录的id,那么如何查看wordpress的分类id呢?有两种方法: 通过wordpress后台查看分类的ID ...

  9. (转)WordPress常用模板函数 修改或自制WordPress主题必备

    对于很多WordPress新手来说,不懂任何代码的情况下去瞎改WordPress主题,得出的效果往往会出现语法错误之类的东西或效果不尽人意.想要修改 WordPress主题模板文件最基本的当然要懂得H ...

随机推荐

  1. 简单的Session登录

    Login前台页面 <form id="form1" action ="" method="post"> <input t ...

  2. Deep Learning(深度学习)相关网站

    Deep Learning(深度学习) ufldl的2个教程(这个没得说,入门绝对的好教程,Ng的,逻辑清晰有练习):一 ufldl的2个教程(这个没得说,入门绝对的好教程,Ng的,逻辑清晰有练习): ...

  3. http 请求安全

    在info.plist中加入 <key>NSAppTransportSecurity</key><dict>    <key>NSAllowsArbit ...

  4. Scala学习之延迟绑定

    package com.swust.example object TraitDemo2 extends App{ //抽象类 abstract class Writer { def writeMess ...

  5. C++学习之this指针

    C++学习之this指针 一个对象的this指针并不是对象本身的一部分,不会影响sizeof(对象)的结果.this作用域是在类内部,当在类的非静态成员函数中访问类的非静态成员的时候,编译器会自动将对 ...

  6. day3_python学习笔记_chapter5_数字

    1. 整形的表示范围-2^32~2^32 - 1 : 长整形表示:aLong = 99999L 2. 复数的属性, num.real,该复数的实部, num.imag,该复数的虚部.num.conju ...

  7. Java中的流程控制(一)

    程序的流程控制(一) 关于Java程序的流程控制(一) 从结构化程序设计角度出发,程序有三种结构: 顺序结构 选择结构 循环结构 1.顺序结构 就是程序从上到下一行行执行,中间没有判断和跳转. 2.i ...

  8. 让IE6也能智能控制图片最大宽、高度

    当一个图片的宽度或高度超出了容器时,我们一般会用max-width或max-height来设置其最大宽.高度,让图片不会超出容器,但是如果同时设置了最大高度和最大宽度时,有可能会造成图片最终显示会有些 ...

  9. Gulp 从0开始

    http://www.w3ctech.com/topic/134  (该文章有很多错误) http://markpop.github.io/2014/09/17/Gulp%E5%85%A5%E9%97 ...

  10. win7系统中桌面图标显示不正常问题

    http://jingyan.baidu.com/article/466506580c9327f549e5f8dc.html 最近笔者在安装软件时,突然出现了桌面图标显示不正常了,一开始还以为是新安装 ...