그누커머스 검색결과 수정
본문
안녕하세요
워드프레스에서 검색시
그누커머스 게시판 '검색결과'가
"제목"
내용
이렇게 검색이 되는데요
'검색결과 '화면에서 내용은 표시되지 않고
"제목"
만 나오게 가능할까요?
====
비회원도 추천/비추천 사용가능 하게 할수 있을까요?
답변 1
전체 검색에서 내용을 표시하지 않으려면 아래와 같이 코드를 넣어주세요.
add_filter('gc_search_as_fileds', 'custom_gnucommerce_search_fileds');
function custom_gnucommerce_search_fileds($arr){
$arr = array(
"wr_id as ID",
"user_id as post_author",
"wr_datetime as post_date",
"wr_datetime as post_date_gmt",
"'' as post_content", //내용이 공백으로 표시
"wr_subject as post_title",
"'' as post_excerpt",
"'publish' as post_status",
"'open' as comment_status",
"'open' as ping_status",
"'' as post_password",
"wr_id as post_name",
"'' as to_ping",
"'' as pinged",
"wr_last as post_modified",
"wr_last as post_modified_gmt",
"'' as post_content_filtered",
"wr_parent as post_parent",
"'' as guid",
"0 as menu_order",
"'gcboard' as post_type",
"'' as post_mime_type",
"wr_comment as comment_count"
);
return $arr;
}
비회원 추천이나 비추천은 제작의뢰 하셔야 할것 같네요...
!-->
답변을 작성하시기 전에 로그인 해주세요.