[WordPress] 外掛分享: 4WP Smart Link

首頁外掛目錄 › 4WP Smart Link
WordPress 外掛 4WP Smart Link 的封面圖片
20+
安裝啟用
尚無評分
5 天前
最後更新
問題解決
WordPress 6.4+ PHP 7.4+ v1.2.3 上架:2026-05-11

內容簡介

4WP Smart Link 外掛使 Cover、Group 和 Column 區塊在前端完全可點擊,無需自訂 CSS 或包裝區塊,並且不會破壞區塊內的嵌套連結。這樣可以提升用戶互動性,讓整個卡片成為一個點擊目標。

【主要功能】
• 使 Cover、Group 和 Column 區塊完全可點擊
• 支援在 Query Loop 中使用
• 保留內部連結的獨立性
• 簡化點擊行為的設定
• 兼容 FSE 佈景主題和經典佈景主題

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.2.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「4WP Smart Link」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

4WP Smart Link makes Cover, Group, and Column blocks fully clickable on the front end—without custom CSS, without wrapper blocks, and without breaking nested links inside the block.
Add it to a Query Loop post template and the whole card becomes one tap target that opens the post, while the post title, categories, tags, and buttons keep working independently.
Learn more, compare approaches, and see use cases on the 4WP Smart Link plugin page.
A plugin by 4wp.dev. 4WP is our project brand; the letters “WP” appear only as part of that brand name, not as a reference to WordPress. This plugin is not affiliated with, endorsed, or sponsored by WordPress.
Demo

Perfect for

Clickable post cards in a Query Loop—click the image or padding to open the post
Cover heroes linked to a landing page, the current post, the background image file, or Enlarge on click (WordPress core lightbox)
Group or Column card layouts—portfolio grids, service cards, team blocks—where the whole visual unit should behave as one link
FSE block themes and classic themes that use Gutenberg blocks

How it works

Select a Cover, Group, or Column block.
Open Smart Link in the block toolbar.
Choose Custom Link, Post Link (inside a Query Loop post template), or—on Cover with an image background or on Featured Image in a post template—Enlarge on click (core lightbox).
Open Preview or the published page to test clicks.

Smart Link runs on the published front end. The block editor canvas may not show the same click area as the live site—use Preview when you check behavior.
When the block already has links inside
If the block has no other links inside, the whole block opens your URL (anchor mode).
If you added a Post Title, buttons, or terms inside the block, the plugin switches to host mode: those links still work separately, and clicking empty space (background, padding, image) opens your Smart Link URL—without invalid nested tags.
Cover lightbox and page gallery
On Cover blocks with an image background you can choose Enlarge on click. The same option is available on the Featured Image block in Query Loop post templates. This uses the WordPress core lightbox (the same behaviour as the Image block): a small expand control opens the full image; the block area itself is not a whole-block link.
In the sidebar you can turn on Include in page lightbox gallery so visitors can move to other enlarged images on the same page (Cover and Image blocks that use the core lightbox). Turn it off on a single Cover to open only that image.
Why 4WP Smart Link?
WordPress still does not ship a native “make this whole block clickable” option for Cover, Group, or Column—especially inside Query Loop cards with dynamic permalinks and inner links. CSS-only workarounds and raw HTML
wraps break down quickly. 4WP Smart Link adds a toolbar control, handles anchor vs. host mode automatically, and keeps output valid and accessible.
For developers and theme authors
Anchor mode (no inner links): wraps markup in
with data-forwp-smart-link.
Host mode (inner links present): uses data-forwp-smart-link-url and assets/forwp-smart-link-frontend.js so link-in-link HTML is never output; inner anchors stay separate.
Cover lightbox: smartLinkDestination value lightbox and smartLinkLightbox attributes; optional page gallery via assets/forwp-smart-link-lightbox-gallery.js and core Image block lightbox modules.
Filters: forwp_smart_link_supported_blocks, forwp_smart_link_has_inner_links, forwp_smart_link_use_host_mode, forwp_smart_link_cover_media_url, forwp_smart_link_cover_featured_post_id, forwp_smart_link_featured_image_lightbox_markup.
Style .forwp-smart-link-wrapper and .forwp-smart-link-host on the front end. Editor-only classes (forwp-smart-link-cover-panel*, forwp-smart-link-featured-image-has-lightbox) are not stable for theme CSS.
Source and issues: 4wp-smart-link on GitHub.

延伸相關外掛

文章
Filter
Mastodon