前言介紹
- 這款 WordPress 外掛「Loops & Logic」是 2021-05-20 上架。
- 目前有 2000 個安裝啟用數。
- 上一次更新是 2025-04-24,距離現在已有 9 天。
- 外掛最低要求 WordPress 6.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 有 38 人給過評分。
- 論壇上目前有 2 個提問,問題解答率 50%
外掛協作開發者
外掛標籤
loop | logic | query | content | template |
內容簡介
Facebook group | homepage| docs |official support forum
Loops & Logic 是一個工具集,讓你可以對 WordPress 內容和數據在網站前端進行廣泛的控制,以應對當你的主題或生成器沒有你需要的選項時。這個外掛使用一個類似於 HTML 的簡化語法,給你使用自定義 PHP 主題和生成器模塊開發的能力,對於任何前端開發人員來說都是熟悉的。
支援
詳細的外掛功能說明請參閱我們的官方插件網站和文檔。
你可以在官方支援論壇找到支援和討論。
主要功能
使用包含循環、字段和條件語句等動態標籤的 HTML 模板。
使用主題位置規則將自定義模板應用於文章類型、分類等等(類似於 Beaver Themer 或 Elementor 主題生成器)。
使用可視化位置規則生成器輕鬆地將 CSS 樣式表和 JavaScript 移動到任何位置。
直接在 SASS 中無縫地編寫 CSS,不必擔心編譯問題。
創建任何內容類型的查詢循環,例如:文章、頁面、自定義文章類型、附件、用戶、分類和詞彙。
顯示內置和自定義場景。
創建基於某些條件顯示任何東西的邏輯,例如:為某些鏈接只為登錄用戶創建菜單,或者按用戶角色分配鏈接。
創建自定義短代碼以顯示從自定義場景到整個動態數據驅動網頁的任何內容。
使用示例
在 L&L 的核心是快速優雅地遍歷 WordPress 數據,在這裡,我們通過以下範例來顯示最近三篇文章的連結列表:
要在 PHP 中實現相同的功能,需要更複雜的代碼:
$args = array(
'post_type' => 'post',
'posts_per_page' => 3,
'orderby' => 'date',
'order' => 'DESC',
);
$query = new WP_Query( '$args' ); ?>
have_posts() ) : ?>
如果你不是後端開發人員,向你的網站添加 PHP 可能是很困難的,但是即使在頁面生成器布局中,L&L 也很容易包含。
類似於 Gutenberg、Elementor 和 Beaver Builder,頁面生成器通常會存在一些能力上的瓶頸,這通常需要你開發一個自定義的擴展或購買一個庞大的擴展包才能獲得你需要的元素。L&L 將模板編輯器模塊直接添加到每個生成器中,這樣你就可以隨意描述在 L&L 代碼中要顯示的內容,並使用生成器接口將其放置。你甚至可以在頁面生成器佈局中混合使用 L&L 和其他元素。
原文外掛簡介
Facebook group | homepage| docs |official support forum
Loops & Logic is a toolset that allows you to have extensive control over the display of WordPress content & data on your site’s frontend for when your theme or builder doesn’t have the options you need. This plugin gives you the power of custom PHP theme & builder module development using a simplified HTML-like syntax that will be familiar to any frontend developer.
Support
Please see the official plugin site and the documentation for a complete description of plugin features.
Support & discussions can be found on our forum located here.
Key Features
Use HTML templates with dynamic tags like Loop, Field, and If
Use theme location rules to apply custom templates to post types, taxonomies & more (similar to Beaver Themer or Elementor Theme Builder)
Easily enqueue your CSS stylesheets and Javascript anywhere using a visual location rule builder
Seamlessly write your CSS directly in SASS without worrying about compilation
Create query loops of any content type, such as: posts, pages, custom post types, attachments, users, taxonomies and terms
Display built-in and custom fields
Build logic to display things based on certain conditions, for example: creating a menu, with some links only for logged-in users, or by user role
Create custom shortcodes to display anything from a custom field to an entire dynamic-data driven web page
Example Usage
At the core of L&L is the ability to quickly and elegantly loop through WordPress data like in this example of displaying a list of links to the three most recent posts
Accomplishing the same thing in PHP is a little more complex:
'post',
'posts_per_page' => 3,
'orderby' => 'date',
'order' => 'DESC',
);
$query = new WP_Query( '$args' ); ?>
have_posts() ) : ?>
It can be difficult to add PHP to your site if you’re not a backend developer, but L&L is a breeze to include, even in a page builder layout.
Page builders like Gutenberg, Elementor, and Beaver Builder often have gaps in their capabilities that would normally require you to either develop a custom add-on or purchase a bloated add-on pack just to get the one element you need. L&L adds a template editor module directly to each builder so that you can simply describe what you want to display in L&L code and place it using the builder interface. You can even copy-paste your L&L code between page builders if you work with more than one! It’s like having your own page builder addon factory.
Plugin & Theme Support
Plugin Support:
Loops & Logic works with the post types and custom fields added by most plugins, but plugins with special data structures like a custom tables or fields with data formats that need parsing require us to program explicit support.
Bundled integrations:
✅ Advanced Custom Fields (ACF)
L&L supports Advanced Custom Fields (ACF) field types in the core, allowing you to work with most of their field types out of the box! We also plan to support other WordPress custom field plugins such as Pods & Metabox in the future.
Layout 1
Layout 2
✅ Elementor
Loops & Logic provides an Elementor widget that allows you to either write L&L code directly in the page builder widget or select from a pre-existing saved template.
✅ Gutenberg
Loops & Logic provides a Gutenberg block that allows you to either write L&L code directly in the block builder block or select from a pre-existing saved template.
✅ Beaver Builder
Loops & Logic provides a Beaver Builder module that allows you to either write L&L code directly in the page builder module or select from a pre-existing saved template.
✅ WP Grid Builder
Loops & Logic provides a WP Grid Builder block that allows you to select from a pre-existing saved template to load in WP Grid Builder.
✅ WP Fusion
The freely-included WP Fusion integration allows you to use conditional logic to protect or display different content based on a user’s tags.
User has tag ID 123
User does not have tag.
We’ll be rolling out premium addons for popular plugins in the coming months, so check out our website to see what’s available!
Premium addons coming soon:
WooCommerce
Easy Digital Downloads
Modern Tribe Events Calendar
Gravity Forms
LearnDash
LifterLMS
Theme Support:
Everything will work with themes built according to WordPress standards.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Loops & Logic」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.1.3 | 1.1.5 | 1.1.6 | 1.2.0 | 1.2.1 | 1.2.2 | 1.2.3 | 1.2.4 | 1.2.5 | 1.2.6 | 1.2.7 | 1.2.8 | 2.0.2 | 2.0.4 | 2.0.5 | 2.0.6 | 2.0.8 | 2.1.4 | 2.1.5 | 2.1.6 | 2.1.7 | 2.2.3 | 2.2.4 | 2.2.5 | 2.2.9 | 2.3.0 | 2.3.2 | 2.3.3 | 2.3.5 | 2.3.6 | 2.3.7 | 2.3.9 | 2.4.1 | 2.4.2 | 2.4.3 | 2.4.4 | 3.0.0 | 3.0.1 | 3.1.1 | 3.1.2 | 3.1.3 | 3.1.4 | 3.1.5 | 3.1.7 | 3.1.8 | 3.1.9 | 3.2.0 | 3.2.1 | 3.2.2 | 3.2.3 | 3.2.4 | 3.2.5 | 3.2.7 | 3.2.8 | 3.2.9 | 3.3.0 | 3.3.1 | 4.0.0 | 4.0.1 | 4.0.2 | 4.1.0 | 4.1.1 | 4.1.2 | 4.1.3 | 4.1.4 | 4.1.5 | 4.1.7 | 4.1.8 | 4.2.1 | 4.2.2 | trunk |
延伸相關外掛(你可能也想知道)
Template Kit – Import 》一個範本套件是一組預先設計好的起始範本,供 WordPress 網站建立者使用,並具有統一的視覺風格。, 您可以使用此外掛程式匯入 Elementor 的範本套件。, 啟用...。
Show Current Template 》這是一款 WordPress 外掛程式,可以在工具列中顯示目前的模板檔案名稱、主題名稱和已包含的模板檔案名稱。如果您喜歡這個外掛, 歡迎買我一杯咖啡!😉此外,...。
What The File 》What The File 是一個 WordPress 外掛,在您的工具列中增加了一個選項,顯示目前正在檢視的頁面所使用的文件和模板部分。, 您可以通過單擊文件名直接使用佈景...。
Custom Field Template 》「Custom Field Template 外掛」在「編寫文章/頁面」時,新增自訂欄位的預設設定。這個模板格式基本上跟「rc:custom_field_gui 外掛」差不多,不同處在於:, ...。
Fullwidth Templates for Any Theme & Page Builder 》全寬度網頁範本外掛, 你的佈景主題是否提供全寬度網頁範本?是否需要使用 Beaver Builder、Elementor 等頁面構建者來設計漂亮的全寬度佈局?是否需要完全沒有...。
TinyMCE Templates 》TinyMCE Template 外掛可在 WordPress 視覺化編輯器上使用 HTML 範本。, , 官網, GitHub, , 部份功能:, , 加入「插入範本」按鈕至視覺化編輯器。, 你可在 Wor...。
Multiple Themes 》重要提示:支援服務已移至 ZATZLabs 網站,不再於 WordPress.org 論壇提供。如需開發者迅速回覆,請提交請求單。, 此外掛設定提供多種選擇方式,可讓您選擇要...。
Genesis Custom Blocks 》Genesis Custom Blocks 為 WordPress 開發人員提供了必要的工具,以應對現代 WordPress 「區塊先行」的實境。, WordPress 區塊編輯器(又稱 Gutenberg)為我...。
Custom Post Template 》提供一個下拉式功能,讓您可以在文章編輯頁面中選擇不同的模板。這些模板和頁面模板類似,且會取代指定文章的 single.php。然而此外掛並不會在文章列表頁面(...。
Canvas 》這是一個翻轉傳統的基於區塊的頁面建構器,結合了WordPress 區塊編輯器的特點,擁有卓越的 UI 設計。。
Gantry 5 Framework 》Gantry 5是一個全面的建構模組集,可協助快速將設計實現為具有彈性和功能強大的網站主題。, , 請訪問http://gantry.org以下載免費的WordPress Gantry 5預設主...。
A WP Life Companion 》這個 A WP Life Companion 外掛是為 A WordPress Life 主題所創建的。, 此外掛會為 A WordPress Life 主題添加自訂前頁區塊,並允許您完全自訂主題前頁區塊的...。
WP Layouts 》利用 WP Layouts,您不再需要花時間在硬碟或雲端導入、導出、排序、搜尋及組織 JSON 檔案。這是目前最佳的方式可以讓您整理、導入及導出版面配置,特別是當您...。
Export Themes 》這個外掛讓你能夠將主題以 .zip 檔案匯出,然後利用 WordPress 的「上傳」功能,在其他伺服器上安裝相同的主題。, 使用方式, 安裝完外掛後,你需要進入「外觀...。
which template file 》想知道 WordPress 在前台顯示頁面時使用哪個模板嗎?, 這個外掛可以幫您達成這個目的。您可以在免費的模擬網站上嘗試使用:點此連結 => https://tastewp.c...。