Z - blog PHP 플 러 그 인은 if $type 을 사용하여 페이 지를 판단 하여 다른 페이지 에 다른 콘텐츠 를 삽 입 합니다 .

Z-blogPHP플러그인 구현은 다른 페이지에 다른 콘텐츠를 삽입합니다!

다른 말로하면, Z - blog PHP 플러그인은 지정된 페이지에 콘텐츠를 삽입하는 것을 구현합니다!


Z - blog PHP 플러그인은 홈페이지와 목록 페이지에 콘텐츠를 삽입합니다.

인터페이스 작성:

PHP
Add_Filter_Plugin('Filter_Plugin_ViewList_Core','插件ID_ViewList_Core');//在首页和列表页生效

삽입 컨텐트 작성:

PHP
function 插件ID_ViewList_Core(&$type) {global $zbp;if ($type=='index'){}//判断首页if ($type=='category'){}//判断分类页if ($type=='tag'){}//判断标签页if ($type=='author'){}//判断作者页if ($type=='date'){}//判断日期页}


Z - blog PHP 플러그인 세부 사항 페이지에 콘텐츠 삽입

인터페이스 작성:

PHP
Add_Filter_Plugin('Filter_Plugin_ViewPost_Template','插件ID_ViewPost_Template'); //详情页

삽입 컨텐트 작성:

PHP
function 插件ID_ViewPost_Template(&$template) {    		 	   	global $zbp;
     $article = $template->GetTags('article');
     if ($type = $template->GetTags('type') =='article'){}//判断文章页(article)
     if ($type = $template->GetTags('type') =='page'){}//判断页面(page)}


Z - blog PHP 플러그인 검색 페이지에 콘텐츠 삽입

인터페이스 작성:

PHP
Add_Filter_Plugin('Filter_Plugin_ViewSearch_Template','插件ID_ViewSearch_Template'); //搜索页

삽입 컨텐트 작성:

PHP
function 插件ID_ViewSearch_Template(&$template) {global $zbp;}


응용 프로그램 인스턴스:

다음 플 러 그 인은 if $type 판단 을 사용하여 다른 콘텐츠 를 삽 입 하기 위해 다른 페이 지를 구현 합니다 .

image.png

싫다1

이 문서의 링크:https://ko.finchui.com/zblog-course/19.html

네티즌 댓글

아마 좋아하실 겁니다.

인기 상품
인기 기사
핫 레이블
관련 레이블
Finch UI 스토어 버전

공유하다

링크 복사

성岚 스튜디오친구 등록

출 근 시간 : 9: 00 ~ 22: 00
토요일, 일요일: 14: 00 - 22: 00
wechat
코드를 스캔하여 고객서비스 위챗을 추가하다