[WordPress] 外掛分享: VS Knowledge Base

首頁外掛目錄 › VS Knowledge Base
WordPress 外掛 VS Knowledge Base 的封面圖片
300+
安裝啟用
★★★★
4.8/5 分(16 則評價)
50 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v8.7 上架:2014-08-28

內容簡介

關於

這是一個輕量級的外掛,用於建立知識庫。

在頁面上添加 shortcode [knowledgebase] 或使用小工具來顯示您的分類和文章。

您可以通過為縮略語或小工具添加屬性來個性化您的知識庫。

此外,此外掛還可用於創建常見問題或維基百科。

您還可以從自定義文章類型(例如“產品”或“事件”)中列出分類和文章。

使用方法

安裝後創建一個頁面,並添加 shortcode [knowledgebase] 以顯示您的分類和文章。

或者,轉到外觀 > 小工具並使用小工具來顯示您的分類和文章。

默認分類設置:

使用縮略語時為4列
使用小工具時為1列
按名稱排序
升序排列(A-Z)
隱藏空分類
父類和子類別分開列出

默認文章設置:

按日期排序
降序排列(新到舊)
顯示所有文章

Shortcode 屬性

您可以為上述shortcode添加屬性。

將自定義 CSS 類添加到知識庫: class="your-class-here"
更改列數: columns="3"
包括某些分類: include="1,3,5"
排除某些分類: exclude="8,10,12"
顯示空分類: hide_empty="0"
顯示分類說明: description="true"
更改每個分類的文章數量: posts_per_page="5"
按升序顯示文章: order="ASC"
按標題顯示文章: orderby="title"
隨機顯示文章: orderby="rand"
顯示文章數量(文章計數):count="true"
顯示文章元數據(日期和作者):meta="true"
顯示“查看全部”鏈接:all_link="true"
更改“查看全部”鏈接的標籤:all_link_label="your label here"
更改沒有標題的文章的標籤:no_title_label="your label here"

關於列屬性:您可以選擇1-4列,在移動設備屏幕上為2列(除了1列知識庫)。

當使用您自己的樣式時,您可以使用columns="0"來禁用分隔線風格。

範例:

一個屬性:[knowledgebase posts_per_page="5"]
多個屬性:[knowledgebase include="1,3,5" hide_empty="0" meta="true"]

小工具屬性

小工具支持相同的屬性。不要添加主要的 shortcode 標籤或括號。

範例:

一個屬性:posts_per_page="5"
多個屬性:include="1,3,5" hide_empty="0" meta="true"

文章標籤

除了按類別列出文章外,您還可以按標籤列出文章:taxonomy="post_tag"

自定義文章類型

您還可以從自定義文章類型(例如“產品”或“事件”)中列出分類和文章。

要列出這些分類和文章,您應該添加2個 shortcode 屬性:“taxonomy”和“post_type”

例如,您可以列出 WooCommerce 產品:

列出產品:taxonomy="product_cat" post_type="product"

外掛標籤

開發者團隊

⬇ 下載最新版 (v8.7) 或搜尋安裝

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

原文外掛簡介

About
With this lightweight plugin you can create a knowledge base that contains your categories and posts.
Main features of the plugin:

Free and lightweight
Support for Block Editor and Classic Editor
Display your knowledge base with block, shortcode or widget
Custom post types are supported (such as WooCommerce product categories and products)
Customize your knowledge base with attributes
Documentation at WP plugin page
Active support from developer at WP forum

With this plugin you can also create a FAQ or wiki in the same way as a knowledge base.
How to use
After installation make sure you already have some categories and posts.
Go to the editor and add the VS Knowledge Base block or the shortcode [knowledgebase] to a page. This will display your knowledge base.
Or go to Appearance > Widgets and use the VS Knowledge Base widget.
Default settings categories:

4 columns when using block or shortode
1 column when using widget
2 columns in small screens
Order by name
Ascending order (A-Z)
Empty categories are hidden
Parent and subcategories are displayed separately

Default settings posts:

Order by date
Descending order (new to old)
All posts are displayed

Customize your knowledge base with attributes.
Attributes
You can customize your knowledge base by adding attributes to the block, shortcode or widget.

Add custom CSS class to knowledge base: class="your-class-name"
Change the number of columns: columns="3"
Disable the columns: columns="0"
Include certain categories: include="1,3,5"
Exclude certain categories: exclude="8,10,12"
Display empty categories too: hide_empty="0"
Change the number of posts per category: posts_per_category="5"
Reverse the order of posts: order="ASC"
Display posts by title: orderby="title"
Display posts in random order: orderby="rand"
Disable category link: category_link="false"
Display category description: category_description="true"
Display post counter: post_count="true"
Display post meta (date and author): post_meta="true"
Display View All link: view_all_link="true"
Change label of View All link: view_all_link_label="your label"
Change label of post without title: no_post_title_label="your label"
Change the “no categories are found” text: no_categories_text="your text"

Example: [knowledgebase include="1,3,5" hide_empty="0" post_meta="true"]
When using the block or the widget, don’t add the main shortcode tag or the brackets.
Example: include="1,3,5" hide_empty="0" post_meta="true"
With the columns attribute you can set the number of columns between 1 and 4.
In small screens max 2 colums.
You can disable the columns in favour of your own styling.
The columns attribute will be ignored when using the block or widget. Because you can set the columns via the block or widget settings.
Post tags
Besides displaying posts by category you can also display posts by tag: taxonomy="post_tag"
Custom post types
It’s also possible to display categories and posts from a custom post type (such as WooCommerce product categories and products).
To display these categories and posts you should add 2 attributes: “taxonomy” and “post_type”
WooCommerce:

Product categories and products: taxonomy="product_cat" post_type="product"
Include product category image: taxonomy="product_cat" post_type="product" woo_image="true"
Display by tag instead of category: taxonomy="product_tag" post_type="product"

Have a question?
Please take a look at the FAQ section.
Translation
Translations are not included, but the plugin supports WordPress language packs.
More translations are very welcome!
The translation folder inside this plugin is redundant, but kept for reference.
Credits
Without help and support from the WordPress community I was not able to develop this plugin, so thank you!

延伸相關外掛

文章
Filter
Apply Filters
Mastodon