
外掛標籤
開發者團隊
原文外掛簡介
Make Cover, Group, and Column blocks fully clickable in Gutenberg.
Build Query Loop post cards where visitors can click the image or padding to open the post—while the post title, categories, tags, and buttons keep their own links.
A plugin by 4wp.dev.
Demo
Perfect for
Clickable post cards in a Query Loop
Cover heroes that link to a landing page, the current post, or Enlarge on click (core lightbox)
Group or Column layouts that behave like one big tap target
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: Link to image file / Enlarge on click.
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.
If you added a Post Title, buttons, or terms inside the block, those links still work separately. Clicking empty space (background, padding) opens your Smart Link URL—without broken nested links.
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.
Filters: forwp_smart_link_supported_blocks, forwp_smart_link_has_inner_links, forwp_smart_link_use_host_mode.
Style .forwp-smart-link-wrapper on the front end. Editor-only classes (forwp-smart-link-cover-panel*) are not stable for theme CSS.
Source and issues: 4wp-smart-link on GitHub.
