显示你的博客信息,一般是管理员的用户资料和常规设置中输入的信息。这个标签可以在博客主题模板的任何一个地方使用。一般是直接向浏览器输出结果,如果你需要赋值到PHP,请用 get_bloginfo() 。
<?php bloginfo( $show ); ?>
注意所有URL结尾都没有带斜杠“/”。如果是使用在子主题,则使用父主题为父项。使用没有带参数的 bloginfo() 则默认输出为 bloginfo('name')。
name = Testpilot description = Just another WordPress blog admin_email = admin@example url = http://example/home wpurl = http://example/home/wp 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 = 3.1
<h1><?php bloginfo('name'); ?></h1>
<a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>
显示博客正在使用的字符集(如: utf-8)。
<p>字符集:<?php bloginfo('charset'); ?> </p>
显示在博客后台“设置 – 常规”选项副标题所输入的信息。
<p><?php bloginfo('description'); ?> </p>
用途:get_bloginfo()
起源于:0.71
bloginfo() 位于 wp-includes/general-template.php
拥有多年WordPress博客/企业建站开发经验,独树一帜的设计,提供最专业的网站设计方案;原创的主题标签语义化,增强网站优化效果。
增强用户体验、提高品牌形象给人留下深刻的印象,那就选择我们,我们的每一款主题都是独一无二的,都有自己的灵魂,每款主题都有各自的配色方案。
遵循现代网页设计的趋势,所有主题都提供完整的响应式布局,优化大桌面显示器以及对平板和智能手机的支持,从而提供一致性的用户体验。
长期及时地在线售后服务和免费升级更新,确保您的网站始终运行在最佳状态,24小时QQ在线的沟通方式免去您的后顾之忧,替您节省网站维护成本。
目前还没有评。