| 开发者 |
4wpdev
anatolikkk |
|---|---|
| 更新时间 | 2026年5月29日 19:52 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp-content/plugins/ or install the ZIP through Plugins → Add New.<a class="forwp-smart-link-wrapper forwp-smart-link-wrapper--{cover|group|column}"> 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.Cover, Group, and Column blocks from the WordPress block library.
The block looks and behaves as usual—no extra link is added.
When the block is inside a Query Loop post template. Each card uses that post’s permalink. Outside a Query Loop, use Custom Link and enter your URL.
WordPress Cover does not make the whole block one click target in the way card layouts need. 4WP Smart Link adds that on the front end—see Other Notes if you theme or extend the plugin.
No. It runs on its own.
Place a Cover (or Group / Column) inside the Query Loop post template. Select the block, open Smart Link, and choose Post Link. Check clicks on the published page or in Preview.
Turn on Smart Link on the Group (or Column / Cover). Buttons, title, categories, and tags keep their own links. Clicks on empty areas (image, padding) open your Smart Link URL.
Select a Cover with an image background (not video only). Open Smart Link in the toolbar, choose Enlarge on click. The cover uses the same core lightbox as the Image block—a small expand icon opens the full image; the rest of the cover is not a link. In the sidebar you can include the cover in the page lightbox gallery to move between enlarged images on the same page.
Use Query Loop with Cover or Group, enable Smart Link with Post Link, and add Post Title or Post Terms inside the card if you want. Visitors can open the post from the card surface and still use inner links.
Not always. The clickable layer is added when WordPress renders the page on the front end. Use Preview or view the published page to confirm clicks and theme styles.
With no inner links, the whole block is one link—easy to tap and clear for assistive tech. When inner links exist, keyboard and screen-reader users can still reach buttons and text links separately; empty areas open your Smart Link URL.
rel when opening in a new tabIf you open in a new tab, the plugin adds noopener and noreferrer when needed, and keeps your own nofollow or other rel values.