워드프레스에 방명록 추가하기 (reverse order)
Thursday, January 8th, 2009워드프레스는 기본적으로 방명록이 지원되지 않는다.
플러그인으로 다양한 방명록이 존재하는데, 그 중에 설치하기 편하고 괜찮은 것 하나.
http://wordpress.org/extend/plugins/reverse-order-comments/other_notes/
1. 다운받아서 reverse-order-comments.php 파일은 플러그인 디렉토리에 넣고 activation
2. 두 파일 (comments-topinput.php, tpl_guestbook.php) 은 사용하는 테마 디렉토리에 넣는다.
(테마가 바뀔 때마다 손봐줘야 하는 번거로움이 있긴 하다. -.-)
방명록 페이지 만드는 방법은..
1. 페이지를 하나 만든다. e.g. “guestbook”
2. Allow comments 를 체크해준다.
3. template 에서 “Guestbook”을 선택한다.
이러면 방명록 페이지 완성
1. 기본 설정으로 하면, 방명록 페이지 본문 내용이 나오지 않는다.
이를 수정하는 방법은,
< h2>< ?php the_title(); ?>< /h2> 뒤에
< ?php the_content(); ?> 를 넣어 주는 것
2. 기본 설정으로 하면, 코멘트보다 코멘트 입력창이 먼저 나온다.
이를 수정하는 방법은,
< ?php if(function_exists(’ro_comments_template’)) ro_comments_template(”/comments-topinput.php”); else comments_template(); ?> 를
< ?php if(function_exists(’ro_comments_template’)) ro_comments_template(); else comments_template(); ?> 으로 변경
3. 모든 포스트의 코멘트 순서를 reverse order로 바꿔주는 방법은
single.php 파일 내의
< ?php comments_template(); ?> 를
< ?php if(function_exists(’ro_comments_template’)) ro_comments_template(); else comments_template(); ?> 으로 변경