內容簡介
Lyza Loop是一個針對主題開發者和熟悉模板的人的WordPress外掛程式,旨在實現以下目標:
大大縮短編寫自訂循環所需的時間
使用希望是簡單直觀的模板處理,模塊化自訂循環標記
提供方便的批次處理變量
尊重調用自訂循環的上下文,以及將所有內容恢復為原樣(例如全局 $wp_query 和 $post 對象)
減少自訂循環的冗長和重複代碼
lyza_loop() 函数有兩部分:
查找文章(或頁面):擴展 query_posts() — lyza_loop() 接受WordPress自己的 query_posts() 接受的任何參數
呈現相關文章或頁面:使用“循環模板”。循環模板是一個具有您希望用於循環中每個文章/頁面的標記(和邏輯)的 PHP 文件。
在插件主頁閱讀更多信息。
外掛標籤
開發者團隊
原文外掛簡介
Lyza Loop is a WordPress plugin for theme developers and template-savvy folks that aims to:
Dramatically shorten the time required to code custom loops
Modularize custom loop markup using what I hope is a straightforward templating process
Provide convenient batching variables
Respect the context in which the custom loop is called and put everything back the way it was (e.g. global $wp_query and $post objects)
Reduce tedious and duplicated code for custom loops
There are two parts to the lyza_loop() function:
Finding posts (or pages): extending query_posts() — lyza_loop() takes any argument WordPress’ own query_posts() takes
Rendering relevant posts or pages: using “loop templates.” A loop template is a PHP file with markup (and logic) you’d like to use for each post/page in the loop.
Read more on the plugin home page
