wordpress模板标签/bloginfo
-描述:
展示博客信息,这些信息大部分来自于wordpress控制面板中的用户配置和常规选项。在一个页面模板中它可以被用于任意地方。它总是向浏览器输出一个结果。
-例子:
显示博客标题
显示字符设置
显示博客描述
展示控制面板中常规选项中的标语
-参数:
admin_email = admin@example
atom_url = http://example/home/feed/atom
charset = UTF-8
comments_atom_url = http://example/home/comments/feed/atom
comments_rss2_url = http://example/home/comments/feed
description = Just another WordPress blog
home = http://example/home
html_type = text/html
language = en-US
name = Testpilot
pingback_url = http://example/home/wp/xmlrpc.php
rdf_url = http://example/home/feed/rdf
rss2_url = http://example/home/feed
rss_url = http://example/home/feed/rss
siteurl = http://example/home
stylesheet_directory = http://example/home/wp/wp-content/themes/largo
stylesheet_url = http://example/home/wp/wp-content/themes/largo/style.css
template_directory = http://example/home/wp/wp-content/themes/largo
template_url = http://example/home/wp/wp-content/themes/largo
text_direction = ltr
url = http://example/home
version = 2.7
wpurl = http://example/home/wp
模板标签template tags/bloginfo rss
-例子:
显示博客标题和链接
-参数:
$show
(字符串)关于博客的详细信息。有效值:
* ‘name’ – blog title; set in General Options. (Default)
博客标题,在常规选项里(默认显示)
* ‘description’ – Tagline for your blog; set in General Options.
描述,在常规选项里
* ‘url’ – URL for your blog’s web site address.
博客网站的地址
* ‘rdf_url’ – URL for RDF/RSS 1.0 feed.
rdf/rss1.0地址
* ‘rss_url’ – URL for RSS 0.92 feed.
rss0.92的地址
* ‘rss2_url’ – URL for RSS 2.0 feed.
rss2.0的地址
* ‘atom_url’ – URL for Atom feed.
atom的地址
* ‘comments_rss2_url’ – URL for comments RSS 2.0 feed.
comments RSS 2.0的地址
* ‘pingback_url’ – URL for Pingback (XML-RPC file).
Pingback (XML-RPC file)的地址
* ‘admin_email’ – Administrator’s email address; set in
General Options.
管理员email地址,在常规选项里
* ‘charset’ – Character encoding for your blog; set in Reading Options.
字符编码,在阅读选项里
* ‘version’ – Verson of WordPress your blog uses.
当前wordpress的版本
下面的在1.5或之后版本中可用:
* ‘html_type’ – “Content-type” for your blog.
* ‘wpurl’ – URL for WordPress installation.
wp安装地址
* ‘template_url’ – URL for template in use.
当前模板的地址
* ‘template_directory’ – URL for template’s directory.
模板目录
* ’stylesheet_url’ – URL for primary CSS file.
主要css文件地址
* ’stylesheet_directory’ – URL for stylesheet directory.
样式目录
函数参考/get bloginfo
-描述:
该函数返回博客的信息,可以在PHP代码中用在其他地方。和bloginfo()一样,展示博客信息。
右上方更多相关内容/站内搜索-关键词请用空格隔开
发表留言