makeBCT

#AI #OpenAI #Chatbot #Cloud #WordPress

코멘트 작성자의 이메일 정보를 보기 위한 코드 수정 팁

다음과 같이 BC TOWN™ 테마에서는 사용자 화면에서 코멘트 작성자의 이메일 정보를 확인할 수 없습니다.

 

 

wordpress-comment

 

BC TOWN™ 테마 사용자 중에서 코멘트 사용자의 이메일 정보를 사용자 화면에서 볼 수 있게 해달라는 경우가 있는데, 이 때 활용할 수 있는 팁(코드 일부 수정)입니다.

 

수정 파일: wp-content/plugins/bct0006/includes/template-functions.php

코드 수정 내용:

 

수정 전:
   $output_comment_author .= '<div class="comment-author"><span class="author fn">' . $author_link . '</span>';

수정 후:
   $output_comment_author .= '<div class="comment-author"><span class="author fn">' . get_comment_author_email_link($comment->comment_author) . '</span>';

수정 전:
   $output_comment_author .= '<div class="comment-author"><span class="author fn">' . get_comment_author_link() . '</span>';

수정 후:
   $author = get_comment_author_email_link($comment->comment_author);

 

이 코드를 추가한 이후의 코멘트 화면은 다음과 같습니다.

 

wordpress-comment1

 

위 그림에서 코멘트 작성자명에 링크가 걸려있고, 마우스를 가져다 대면 하단에 작성자 이메일 정보를 확인할 수 있습니다. 코멘트 작성자 링크를 클릭하면 (사용자 PC 환경에 따라) 다음과 같이 Outlook과 연결이 됩니다.

 

wordpress-comment2

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

인기 글

Ubuntu 22.04 LTS에 Python 3.8 or 3.9 설치 방법
서버 : Vultr 클라우드OS: Ubuntu 22.04 LTS사용자 계정 생성하여 설치 진행함 1. Start with the system update sudo apt update...
Ubuntu 20.04에 MySQL 5.7 설치
비씨티원 인공지능 서비스 플랫폼 BAP(Bctone AI service Platform)의 설치 환경은 공식적으로 Ubuntu 18.04와 MySQL 버전 5.7 입니다. 최근 Ubuntu...
사용자 작성 모듈 import 시 에러)(ModuleNotFoundError: No module named
파이썬 모듈을 만들고 테스트 할 때 ModuleNotFoundError: No module named 에러가 발생한 경우 원인 파이썬은 모듈을 불러올 때 모듈 설치 경로와 자신의...
AWS 인스턴스 유형 변경 방법
AWS 인스턴스 유형을 변경하기 위한 방법에는 다음 2가지가 있습니다.   1. 첫 번째 방법 AMI 이미지 생성 후 해당 이미지를 복원하여 신규 EC2 인스턴스를 생성하는...
WSL2/Ubuntu 22.04 LTS에 Anaconda 설치 
WSL2/Ubuntu 환경에서 Python 버전별로 가상환경을 만드는 방법 중 그나마 Anaconda 방법이 좋은 것 같네요. 설치 방법은 간단합니다. 1. apt update 사용자...