最近开始学习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. oracle表设置主键自增长

    create or replace table TBL_SYS_USER (   user_id             NUMBER(19) not null,   user_name        ...

  2. JavaScript之向文档中添加元素和内容的方法

    一.非DOM方法添加 1.document.write() <html xmlns="http://www.w3.org/1999/xhtml"> <head&g ...

  3. 红豆带你从零学C#系列之:开始C#编程(一)

    让我们开始学习C#编程吧 作者:红豆西米露 交流QQ:937802080 前面的文章里给大家介绍了C#语言的一些基本认识,现在我们来开始做一个小程序吧! 在这里以我们以“控制台应用程序”来作演示. P ...

  4. (转)Java通过axis调用WebService

    转自:http://blog.csdn.net/wanglha/article/details/49679825 转载地址:http://www.linuxidc.com/Linux/2015-06/ ...

  5. google base库之simplethread

    // This is the base SimpleThread. You can derive from it and implement the // virtual Run method, or ...

  6. Spark学习之RDD的理解

    转自:http://www.infoq.com/cn/articles/spark-core-rdd/ 感谢张逸老师的无私分享 RDD,全称为Resilient Distributed Dataset ...

  7. zoj 3792 Romantic Value

    题目链接 求最小割的值, 以及割边最少的情况的边数. 先求一遍最小割, 然后把所有割边的权值变为1, 其他边变成inf, 在求一遍最小割, 此时求出的就是最少边数. Inf打成inf  WA了好几发. ...

  8. e.currentTarget

    e.target总是指向点击的目标 e.currentTarget会指向这个点击标的冒泡对象 <div class="wrap"> wrap <div class ...

  9. WL(Wear leveling)磨损平衡

    前面说过,闪存寿命是以P/E次数来计算的,而WL就是确保闪存内每个块被写入的次数相等的一种机制.若没有这个机制,SSD内的闪存颗粒就无法在同一时间内挂掉,那对用户来说就是灾难.       会出现这种 ...

  10. Delphi中Android运行和JNI交互分析

    Androidapi.JNIBridge负责和JNI交互.,既然要交互,那么首先就是需要获得JNI的运行环境,Android本身内置的就有一个Java(Dalvik)虚拟机.所以这个第一步就肯定是要这 ...