內容簡介
本外掛程式使用原生 WordPress 自訂欄位。Gutenberg 和 Classic Editor 都支援自訂欄位。
Pick-n-Post Quote 外掛允許您在側邊欄區域中顯示靜態或精選引用,顯示引用的作者和來源是可選的。如果在兩個側邊欄上使用,支援使用不同的樣式的多個小工具實例。
功能包括:
選擇自己的樣式
字體大小
字體樣式
文本對齊方式
文本顏色
可選顯示引用的作者和來源
可選在靜態頁面上顯示
如果您希望在當前文章上顯示隨機引用,已經有一個名為“Quote Collection”由 Srini G 的外掛可用於此目的。
新增自訂欄位
如果您使用 Classic Editor:
進入 WordPress 文章編輯畫面,選擇您想要顯示特色引用的其中一篇文章。
滾動到頁面頂部以查看“螢幕選項”。
勾選“自訂欄位”復選框。
如果您使用 Gutenberg 編輯器:
進入 WordPress 文章編輯畫面,選擇您想要顯示特色引用的其中一篇文章。
點擊右側的“三點”設置按鈕,進入“選項”。
向下滾動,直到看到“自訂欄位”選項。
勾選“自訂欄位”復選框,等待頁面重新加載。
向下滾動,直到看到“自訂欄位”元框。點擊“輸入新值”來添加每個自訂欄位,請注意,您只需要輸入字段“鍵”一次。
要添加引用,請在自訂欄位“名稱”下使用“pick_n_post_quote”。在“值”區域中輸入引用。點擊“添加自訂欄位”。
要添加作者,請在自訂欄位“名稱”下使用“pick_n_post_quote_author”。在“值”區域中輸入作者名稱。點擊“添加自訂欄位”。
要添加來源,請在自訂欄位“名稱”下使用“pick_n_post_quote_source”。在“值”區域中輸入來源。點擊“添加自訂欄位”。
當自訂欄位有條目時,您可以在數據庫中查看 wp_postmeta 表中是否存在元數據值。要使自訂欄位元鍵出現在“新增自訂欄位”下拉列表中,至少必須輸入單個值。
選擇另一篇文章。由於您已經為每個自訂欄位鍵輸入了一個條目,它們現在將顯示在“新增自訂欄位【選擇】”下拉列表中。您只需要在“值”區域中輸入它們的文本即可。
外掛標籤
開發者團隊
原文外掛簡介
Utilizes the native WordPress custom meta field. Both Gutenberg and Classic Editor supports Custom Fields.
Pick-n-Post Quote plugin allows you to display a static or featured quote for the current post in the sidebar area. Displaying quote author and source is optional. Supports multiple instances of widget with different styling if used on both sidebars.
Features include:
Choose your own style
Font size
Font style
Text alignment
Text color
Optional display of quote author and source
Optional display on static pages
If you wish to display random quote on a current post, a plugin “Quote Collection” by Srini G already exists for this purpose.
Add Custom Field
If you are using the Classic Editor:
Go to WordPress Post edit screen and select one post where you want to show a featured quote.
Scroll to top of the page to see “Screen Options”.
Tick the “Custom Fields” checkbox.
If you are using the Gutenberg Editor:
Go to WordPress Post edit screen and select one post where you want to show a featured quote.
Click the “three-dots” settings button on the right side and go to “Options”.
Scroll down until you see the option “Custom Fields”.
Tick the “Custom Fields” checkbox. Wait for the page to reload.
Scroll down until you see the “Custom Fields” meta box. Click “Enter New” to add each custom field. Note that you only need to enter a field “key” once.
To add a quote, use “pick_n_post_quote” under Custom Field “Name”. Type your quote in the “Value” area. Hit “Add Custom Field”.
To add an author, use “pick_n_post_quote_author” under Custom Field “Name”. Type your author name in the “Value” area. Hit “Add Custom Field”.
To add a source, use “pick_n_post_quote_source” under Custom Field “Name”. Type your source in the “Value” area. Hit “Add Custom Field”.
When there is an entry for the custom field, you can verify if the meta data value exists in wp_postmeta table in the database. For the custom field meta key to appear in the dropdown under “Add New Custom Field”, there must be at least a single value entered.
Pick another post. Since you already entered one entry for each custom field key, they will now appear in the Add New Custom Field “Select” dropdown. You just need to enter their texts in the “Value” area.
