久久精品水蜜桃av综合天堂,久久精品丝袜高跟鞋,精品国产肉丝袜久久,国产一区二区三区色噜噜,黑人video粗暴亚裔

WordPress: Function Reference/get category link:修訂間差異

來自站長百科
跳轉(zhuǎn)至: 導航、? 搜索
第19行: 第19行:


== 相關(guān)的 ==
== 相關(guān)的 ==
{{標簽 類別 標簽}}
{{PHP 函數(shù) 標簽 頁底文字}}
[[WordPress:Category:Functions|類別:函數(shù)]]
{{Copyedit}}

2008年8月16日 (六) 14:50的版本

描述

為一個特定的類別ID返回正確的url。

這是博客文章的一個類別id,而不是鏈接。

使用不存在的ID會返回一個鏈接,鏈接到母目錄

例子: http://yoursite.com/baseurl/archives/category/

用法

<a href="%%%<?php echo get_category_link($cat);?>%%%">類別 名</a>

參數(shù)

相關(guān)的

Description

描述

Displays a link to the category or categories a post belongs to. This tag must be used within WordPress:The Loop.

顯示文章所屬的類別的連接。必須在The Loop內(nèi),使用這個標簽。

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.

這個用法用分隔符,隔開類別,列出。

<p>Categories: <?php the_category(' '); ?></p>
<p>Categories: <?php the_category(' '); ?></p>
Categories: [[WordPress:#Examples|WordPress]] [[WordPress:#Examples|Computers]] [[WordPress:#Examples|Blogging]]
類別: [[WordPress:#Examples|WordPress]] [[WordPress:#Examples|電腦]] [[WordPress:#Examples|寫博客]]

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>

This post is in: [[WordPress:#Examples|WordPress]], [[WordPress:#Examples|Computers]], [[WordPress:#Examples|Blogging]]


This post is in: [[WordPress:#Examples|WordPress]], [[WordPress:#Examples|電腦]], [[WordPress:#Examples|寫博客]]


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.)

用箭頭顯示類別鏈接(>)分開類別。(注: 使用這種方法的時候,應(yīng)該注意,有的訪客認為類別后面的> 是前面類別的子類別。)

<p>Categories: <?php the_category(' &gt; '); ?></p>

<p>Categories: <?php the_category(' &gt; '); ?></p>

Categories: [[WordPress:#Examples|WordPress]] > [[WordPress:#Examples|Computers]] > [[WordPress:#Examples|Blogging]]
類別: [[WordPress:#Examples|WordPress]] > [[WordPress:#Examples|電腦]] > [[WordPress:#Examples|寫博客]]

Separated by a Bullet

用Bullet分開

Displays links to categories with a bullet (•) separating the categories.

使用bullet (•)分開類別,顯示類別鏈接

%%%

Post Categories: <?php the_category(' &bull; '); ?>

%%% %%%

文章類別: <?php the_category(' &bull; '); ?>

%%%

Post Categories: [[WordPress:#Examples|WordPress]] • [[WordPress:#Examples|Computers]] • [[WordPress:#Examples|Blogging]]
文章類別: [[WordPress:#Examples|WordPress]] • [[WordPress:#Examples|電腦]] • [[WordPress:#Examples|寫博客]]

Parameters

參數(shù)

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)怎樣顯示子類別中的鏈接。選項有:
  • 'multiple' - Display separate links to parent and child categories, exhibiting "parent/child" relationship.
  • 'multiple' -分開顯示母類別和子類別的鏈接,顯示為"母/子"關(guān)系。
  • 'single' - Display link to child category only, with link text exhibiting "parent/child" relationship.
  • 'single' -只顯示子類別鏈接,鏈接文本顯示為"母/子"關(guān)系。
Note: Default is a link to the child category, with no relationship exhibited.

:注:默認是鏈接到子類別的一個鏈接,不顯示關(guān)系。

Related

the_category, the_category_rss, single_cat_title, category_description, wp_dropdown_categories, wp_list_categories, in_category, get_category_parents, get_the_category get_category_link,

模板:PHP Function Tag Footer


相關(guān)的

模板:標簽類別標簽

模板:PHP 函數(shù)標簽頁底文字

模板:PHP 函數(shù) 標簽 頁底文字

類別:函數(shù)

This article is [[WordPress::Category:Copyedits|marked]] as in need of editing. You can help Codex by editing it.