今天开始往昨天做的wordpress模板静态页面中添加wordpress函数代码,首先遇到的是

bloginfo标签的使用,下面讲下bloginfo的用法wordpress bloginfo标签详解-魏星博客

描述:

用来显示博客的信息,如博客名称、描述、地址等

用法:

参数:

name = 博客名称
description = 对博客的描述
admin_email = 管理员邮箱

url = 博客地址
wpurl = wpblog地址

stylesheet_directory = http://example/home/wp/wp-content/themes/child-theme
stylesheet_url = http://example/home/wp/wp-content/themes/child-theme/style.css
template_directory = http://example/home/wp/wp-content/themes/parent-theme
template_url = http://example/home/wp/wp-content/themes/parent-theme

atom_url = http://example/home/feed/atom
rss2_url = http://example/home/feed
rss_url = http://example/home/feed/rss
pingback_url = http://example/home/wp/xmlrpc.php
rdf_url = http://example/home/feed/rdf

comments_atom_url = http://example/home/comments/feed/atom
comments_rss2_url = http://example/home/comments/feed

charset = UTF-8
html_type = text/html
language = en-US
text_direction = ltr
version = 2.9.2

例子:

Character set:

还有很多例子,使用说明,详情请见wordpress官网:http://codex.wordpress.org/Function_Reference/bloginfo