[WordPress] 外掛分享: Taro Lead Next

首頁外掛目錄 › Taro Lead Next
WordPress 外掛 Taro Lead Next 的封面圖片
10+
安裝啟用
尚無評分
27 天前
最後更新
問題解決
WordPress 6.6+ PHP 7.4+ v1.2.1 上架:2021-11-01

內容簡介

此外掛可新增簡單的區塊,提示使用者下一頁文章已經分頁完成,可以點擊查看。

自訂
樣式

HTML 結構如下所示。

<div className="taro-lead-next">
<a href="%link%" class="taro-lead-next-link" rel="next">
<!-- 如果沒有標題,則標題會被省略。 -->
<p className="taro-lead-next-title">
下一頁
</p>
<p class="taro-lead-next-body">
點擊下一頁以查看結果!
</p>
</a>
</div>

在區塊編輯器中,a.taro-lead-next-line 會是 <div> 標籤。

預設樣式表在優先順序為 20 的 init 鉤子上註冊為 tsln-lead-block。
如需完全自定義,請將樣式註冊為相同的名稱。註冊速度比外掛的樣式更快。

add_action( 'init', function() {
wp_register_style( 'tsln-lead-block', 'your-theme/original.css', [], '1.0.0' );
}, 10 );
標題

預設標題為「下一頁」。我們計畫在佈景主題設定中提供自訂化選項,但現在您可以透過過濾器勾子進行變更。

add_filter( 'tsln_next_page_default_title', function( $title ) {
return "接下來是什麼?";
} );

外掛標籤

開發者團隊

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

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

原文外掛簡介

This plugin add a simple block to call user attention to click next page of paginated posts.
Customization
Block Settings
No coding required for basic customization. Select the block in the editor and open the sidebar (Inspector Controls) to change:

Title: The heading text shown above the lead text. Leave empty to omit it.
Text Alignment: Left / Center / Right / Default.

The lead text itself is edited directly and inline, just like a paragraph block.
Style
HTML structure is like this.

In block editor, a.taro-lead-next-line will be

tag.
Default stylesheet is registered as tsln-lead-block in init hook at the priority 20.
For full customization, register your style as a same name. The style registered faster priors to plugin’s style.
add_action( 'init', function() {
wp_register_style( 'tsln-lead-block', 'your-theme/original.css', [], '1.0.0' );
}, 10 );
Header
Default header title is “Next Page”. You can change it per block from the sidebar (see “Block Settings” above). To change the site-wide default instead, use this filter hook:
add_filter( 'tsln_next_page_default_title', function( $title ) {
return "What's Next?";
} );

延伸相關外掛

文章
Filter
Mastodon