wordpress常规配置bloginfo函数
wordpress 中有一些常规的设置,比如首页地址,wordpress安装路径,feed 地址,站点编码格式等等,这些常规的参数在模板中是经常要用到的,wordpress 提供了内置的函数来进行调用这些信息。
当我们需要在模板中调用这些信息的时候直接使用 bloginfo($show) 函数即可,$show 是参数,下面是使用频率较高的参数.
admin_email = admin@example.com
atom_url = https://www.xiariboke.net/home/feed/atom
charset = UTF-8
comments_atom_url = https://www.xiariboke.net/home/comments/feed/atom
comments_rss2_url = https://www.xiariboke.net/home/comments/feed
description = Just another WordPress blog
home = https://www.xiariboke.net/home (DEPRECATED! use url option instead)
html_type = text/html
language = en-US
name = Testpilot
pingback_url = https://www.xiariboke.net/home/wp/xmlrpc.php
rdf_url = https://www.xiariboke.net/home/feed/rdf
rss2_url = https://www.xiariboke.net/home/feed
rss_url = https://www.xiariboke.net/home/feed/rss
siteurl = https://www.xiariboke.net/home (DEPRECATED! use url option instead)
stylesheet_directory = https://www.xiariboke.net/home/wp/wp-content/themes/largo
stylesheet_url = https://www.xiariboke.net/home/wp/wp-content/themes/largo/style.css
template_directory = https://www.xiariboke.net/home/wp/wp-content/themes/largo
template_url = https://www.xiariboke.net/home/wp/wp-content/themes/largo
text_direction = ltr
url = https://www.xiariboke.net/home
version = 3.5
wpurl = https://www.xiariboke.net/home/wp
使用实例如下:
首页地址:bloginfo(‘url’) wordpress安装路径:bloginfo(‘wpurl’),这会儿去调用一些常规的参数就很简单了吧,不用再去直接码网址了。