[WordPress] 外掛分享: Buooy Scroll To Top

首頁外掛目錄 › Buooy Scroll To Top
10+
安裝啟用
★★★★★
5/5 分(2 則評價)
4326 天前
最後更新
問題解決
WordPress 3.8.1+ v1.1.0 上架:2014-03-05

內容簡介

Buooy Scroll To Top 是一個看起來很不錯的「回到頁面頂端」功能,而且非常易於使用。啟用後就可以直接使用!

使用方法

簡單版:

什麼都不需要做!啟用後,當使用者滾動超過 200px 後,它將自動創建一個不錯的「回到頁面頂端」按鈕。

進階版:

有幾種方法可以使用您自己的圖像:

方法1:在您的佈景主題根目錄中創建一個完全相等的名稱為「backtotop」的目錄,並放置一個完全相等的文件名為「backtotop.png」或「backtotop.jpg」或「backtotop.jpeg」或「backtotop.gif」的圖像。如果您有多個圖像文件,圖像文件按順序加載。

方法2:在您的佈景主題的 functions.php 中使用過濾器「back-to-top-image」如下:

if(has_filter(‘back-to-top-image’)){

add_filter( 'back-to-top-image', 'add_back_to_top_image' );

}

function add_back_to_top_image(){

return URL_TO_THE_IMAGE_HERE;

}

開發者團隊

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

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

原文外掛簡介

Buooy Scroll To Top is a Scroll to Top that actually looks nice. And its incredibly easy to use. Just activate and go!
Usage
Simple
Nothing! Just activate and go! It will automatically create a nice back to top button that will appear after your user scrolls beyond 200px.
Advanced
There are a few ways to use your own image:

Method 1: Create a directory with the EXACT directory name of ‘backtotop’ in your theme root directory and place an image with the EXACT file name of ‘backtotop.png’ or ‘backtotop.jpg’ or ‘backtotop.jpeg’ or ‘backtotop.gif’. If you have multiple image files, the image will load in that order.

Method 2: Use the filter ‘back-to-top-image’ as follows in your theme’s functions.php:
if(has_filter(‘back-to-top-image’)){
add_filter( 'back-to-top-image', 'add_back_to_top_image' );

}
function add_back_to_top_image(){
return URL_TO_THE_IMAGE_HERE;

}

延伸相關外掛

文章
Filter
Apply Filters
Mastodon