Template Tags/the tags
From 워드프레스(WORDPRESS) 한국어 위키
This page is marked as incomplete. You can help Codex by expanding it.
Note: This function is only available in WordPress 2.3 or newer.
Contents |
[edit]
Description
이 템플릿 태그는 워드프레스 2.3 에서만 사용 가능하며, 현재 출력되는 글에 등록된 태그(Tag)의 목록을 출력해 준다. v2.3이후 글 쓰기 화면에서 글 입력 창 바로 아랫쪽에 태그를 쉼표로 구분하여 입력하는 란이 추가되어있는 것을 확인 할 수 있다. 단, 이 탬플릿 태그는 워드프레스 루프 안에서만 사용 가능하다.
[edit]
Usage
%%% <?php the_tags('before', 'separator', 'after'); ?> %%%
[edit]
Examples
태그 목록을 출력 한 뒤 줄 건너 띄기를 하려면 아래와 같이 사용하면된다.
<?php the_tags('Tags:', ',', '<br />'); ?>
[edit]
Default Usage
The default usage lists tags with each tag (if more than one) separated by a comma (,) and preceded with the default text Tags: .
<p><?php the_tags(); ?></p>
[edit]
Separated by Arrow
태그 목록을 화살표 (>)로 구분지어 표시하고, 태그 목록의 맨 앞에 Social tagging: 을 출력하려면 아래와 같이 사용하면 된다.
<?php the_tags('Social tagging: ',' > '); ?>
[edit]
Separated by a Bullet
태그 목록을 조그만 점(•) 으로 구분짓고, 맨 앞에 Tagged with: 라는 문구를 출력하며 태그 목록 출력 이후 줄 바꿈을 한 번 하려면 아래와 같이 설정값을 입력하면 된다.
<?php the_tags('Tagged with: ',' • ','<br />'); ?>
[edit]
Parameters
- before
- (문구 혹은 HTML 태그) 태그 목록의 맨 앞에 출력 할 내용. 기본값은 Tags:
- separator
- (문구 혹은 HTML 태그) 각각의 태그 링크를 구분짓는 문자 혹은 태그를 입력. 기본값은 쉼표 (', ')
- after
- (문구 혹은 HTML 태그) 태그 목록의 맨 마지막에 출력 할 내용. 기본값으로는 아무것도 출력되지 않는다.
[edit]

