站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
模板:标签 类别 标签
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
== Description == == 描述 == Displays a link to the category or categories a post belongs to. This tag must be used within [[WordPress:The Loop]]. 显示文章所属的类别的连接。必须在[[WordPress:The Loop|The Loop]]内,使用这个标签。 == Usage == == 用法== %%% <?php the_category('separator', 'parents' ); ?> %%% %%% <?php the_category('separator', 'parents' ); ?> %%% == Examples == ===Separated by Space=== == 例子 == ===由空格分开=== This usage lists categories with a space as the separator. 这个用法用分隔符,隔开类别,列出。 <pre><p>Categories: <?php the_category(' '); ?></p></pre> <pre><p>Categories: <?php the_category(' '); ?></p></pre> <div style="border:1px solid blue; width:50%; padding:10px">Categories: [[WordPress:#Examples|WordPress]] [[WordPress:#Examples|Computers]] [[WordPress:#Examples|Blogging]]</div> <div style="border:1px solid blue; width:50%; padding:10px">类别: [[WordPress:#Examples|WordPress]] [[WordPress:#Examples|电脑]] [[WordPress:#Examples|写博客]]</div> ===Separated by Comma=== ===用逗号分开=== Displays links to categories, each category separated by a comma (if more than one). 显示类别连接,(如果多于一个类别)类别之间用逗号分开。 <p>This post is in: <?php the_category(', '); ?></p> <p>This post is in: <?php the_category(', '); ?></p> <div style="border:1px solid blue; width:50%; padding:10px">This post is in: [[WordPress:#Examples|WordPress]], [[WordPress:#Examples|Computers]], [[WordPress:#Examples|Blogging]]</div> <div style="border:1px solid blue; width:50%; padding:10px">This post is in: [[WordPress:#Examples|WordPress]], [[WordPress:#Examples|电脑]], [[WordPress:#Examples|写博客]]</div> ===Separated by Arrow=== ===用箭头分开=== Displays links to categories with an arrow (>) separating the categories. ('''Note:''' Take care when using this, since some viewers may interpret a category following a > as a subcategory of the one preceding it.) 用箭头显示类别链接(>)分开类别。('''注:''' 使用这种方法的时候,应该注意,有的访客认为类别后面的> 是前面类别的子类别。) <p>Categories: <?php the_category(' &gt; '); ?></p> <p>Categories: <?php the_category(' &gt; '); ?></p> <div style="padding: 10px; width: 50%; border:solid 1px blue">Categories: [[WordPress:#Examples|WordPress]] > [[WordPress:#Examples|Computers]] > [[WordPress:#Examples|Blogging]]</div> <div style="padding: 10px; width: 50%; border:solid 1px blue">类别: [[WordPress:#Examples|WordPress]] > [[WordPress:#Examples|电脑]] > [[WordPress:#Examples|写博客]]</div> ===Separated by a Bullet=== ===用Bullet分开=== Displays links to categories with a bullet (•) separating the categories. 使用bullet (•)分开类别,显示类别链接 %%% <p>Post Categories: <?php the_category(' &bull; '); ?></p>%%% %%% <p>文章类别: <?php the_category(' &bull; '); ?></p>%%% <div style="padding: 10px; width: 50%; border:solid 1px blue">Post Categories: [[WordPress:#Examples|WordPress]] • [[WordPress:#Examples|Computers]] • [[WordPress:#Examples|Blogging]]</div> <div style="padding: 10px; width: 50%; border:solid 1px blue">文章类别: [[WordPress:#Examples|WordPress]] • [[WordPress:#Examples|电脑]] • [[WordPress:#Examples|写博客]]</div> == Parameters == == 参数 == ; separator : (''string'') Text or character to display between each category link. The default is to place the links in an unordered list. ;分隔符: (''string'')链接类别之间显示的文本或者字符。默认是将链接放在无序列表上。 ; parents : (''string'') How to display links that reside in child (sub) categories. Options are: ; parents : (''string'')怎样显示子类别中的链接。选项有: :* <tt>'multiple'</tt> - Display separate links to parent and child categories, exhibiting "parent/child" relationship. :* <tt>'multiple'</tt> -分开显示母类别和子类别的链接,显示为"母/子"关系。 :* <tt>'single'</tt> - Display link to child category only, with link text exhibiting "parent/child" relationship. :* <tt>'single'</tt> -只显示子类别链接,链接文本显示为"母/子"关系。 : Note: Default is a link to the child category, with no relationship exhibited. :注:默认是链接到子类别的一个链接,不显示关系。 == Related == {{Tag Category Tags}} {{PHP Function Tag Footer}} == 相关的 == {{标签类别标签}} {{PHP 函数标签页底文字}}
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
模板:PHP Function Tag Footer
(
编辑
)
模板:PHP 函数标签页底文字
(
编辑
)
模板:Tag Category Tags
(
编辑
)
模板:标签类别标签
(
编辑
)