zblogPHP模板制作過程中,偶爾會用到指定分類中顯示自定義文章數(shù)量,比如某個圖片分類,要求顯示更多文章,可以參考下面這個方法:
來自于 zblog開發(fā)者群,zxasd分享:
include.php內
掛載插件:
Add_Filter_Plugin('Filter_Plugin_ViewList_Core','yunduan_Filter_Plugin_ViewList_Core');
function yunduan_Filter_Plugin_ViewList_Core($type, $page, $category, $author, $datetime, $tag, $w, $pagebar){ if($type =='category'){ if($category->Metas->count>0){ $pagebar->PageCount=$category->Metas->count; } } }再分類里掛載一個$category->Metas->count,可以填寫指定顯示數(shù)量
來自于:2016-12-15 zxasd群內分享