
前言介紹
- 這款 WordPress 外掛「MakeITeasy Back To Top」是 2023-06-15 上架。
- 目前有 1000 個安裝啟用數。
- 上一次更新是 2025-01-06,距離現在已有 117 天。
- 外掛最低要求 WordPress 6.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
lovor |
外掛標籤
block | back to top | scroll to top | Back to Top Button | scroll to top button |
內容簡介
WordPress外掛 - 回到頁面頂端 - 這是一個高度可自訂和輕量的回到頁面頂部解決方案。 - 完全兼容全網站編輯主題,如果啟用區塊編輯器,也與傳統主題兼容。 - 這不同於其他類似的外掛,因為它是一個區塊,您可以在其中插入任何其他區塊,可以優化自定義。默認情況下,插入具有內聯圖像的按鈕區塊,但您可以刪除它,插入任何其他您希望的區塊,自定義默認按鈕或插入自己的圖像。由於按鈕是常規 WordPress 區塊,因此您可以像通常一樣進行自定義,在側邊欄中選擇背景色或前景色,為邊緣選擇邊框半徑或其他任何可以在區塊編輯器中自定義的內容。 - 插件提供一個名為“返回頂部”的區塊,可用於將用戶帶回頁面頂部。默認情況下,僅當用戶向下滾動一定量時才會顯示按鈕。 - 最佳使用方式是使用全網站編輯主題,在那裡您可以將其添加到頁腳(或標題),該區塊將顯示在每個使用此頁腳的頁面上。如果將其添加到頁面,則僅顯示在該頁面上。 - 如果將此區塊添加到頁面上,則僅顯示在此頁面上。為了在許多/所有頁面上顯示它,您必須將其添加到頁腳(或頁眉)。您可以通過在其中一個頁面上創建區塊並複製其代碼(從區塊菜單中選擇複製選項)來實現這一點。然後,在頁腳(標題)php模板中添加“do_blocks($ content);”行,其中將$content替換為複製的區塊內容。內容必須在單引號之間,因為它是字符串,根據 PHP 的規則。 - 在區塊編輯器側邊欄中,可以選擇區塊是否出現在桌面和移動設備的頁面中以及兩者之間的斷點。在按下按鈕時選擇頁面滾動模式:平滑或即時。區塊的不透明度。慢慢出現的持續時間(“淡入”)。區塊從瀏覽器窗口右下角的位置,以自選 CSS 單位進行定位。
原文外掛簡介
Very customizable and lightweight back to top 🔝 solution. Fully compatible with Full Site Editing themes and with classic themes if block editor is enabled. How this differs from other similar plugins? This is a block, inside which you can insert any other block. This makes it utmost customizable. By default, a button block with inline image is inserted, but you can remove it and insert any other block you wish or customize default button or insert your own image. As button is a normal WordPress block, you can customize it like you would normally do, pick background color or foreground color from sidebar, choose border radius for edges, or anything else which is customizable in block editor. Features (block editor sidebar) In the block sidebar, it is possible to choose if the block will appear both on desktop and mobile variant of page and breakpoint between the two. Choose page scroll mode when clicked on button: smooth or instant. Opacity of the block. Duration of slow appearance (“fade in”). Position of the block from bottom right corner of the browser window, in css unit by choice. Go to bottom functionality. DEMO Test in wordpress playground Choose “Live preview” button in top left area of screen. To get this working, a little effort is needed. These are the steps: Enter the admin area Open site editor (Edit site in admin toolbar) On the left sidebar, in AREAS, find Footer Insert “Back to top” block in the footer group block (outer group block, as there are two), as the last element of group. If you insert it outside, it may appear very wide. If you inserted it in the wrong place, correct it by moving the block to position. Set block alignment to right if you want it at the right side. Be carefull to set “Back to top”‘s block alignment, not alignment of the inner button. You can also activate “go to bottom” functionality in the block settings sidebar to try this. Save and navigate to front page. It should work. Or, alternatively, try demo of my popup block, where everything is already set up and also back to top button is showcased: MakeITeasy popup Go to bottom Introduced go to bottom functionality – can be turned on in block sidebar (off by default). When user scrolls down button flips down ⬇ and leads to bottom of page, when scrolled up it flips up ⬆ and leads to top of page. Usage General Plugin provides a block called “Back to top”, which serves the commonly known purpose to take user to top of the page. By default, button appears only when user scrolls some amount down. Block themes The best way to use plugin is using full site editing theme. There you can add it to footer (alternatively to header) and block will be displayed on each page with this footer. If you add it to page, it will be displayed for this page only. Classic themes As mentioned above, adding this block to page will show it only on this page. To show it on many/all pages, you have to add it to footer (or header). You can do so by creating block on one of the pages and copy its code (copy option from block menu). Then, add echo do_blocks($content); line in your footer (header) php template, where you replace $content with copied block content string. Content must be between single quotes, as it is string, according to rules of PHP. Or even better, use nowdoc syntax. Example for theme GeneratePress: First create child theme, so your code is not overwritten by theme updates. Then in footer.php, after line 13 of original footer.php of theme insert following code: echo do_blocks(