Installation & Activation
Upload the Plugin
Go to Plugins → Add New → Upload Plugin. Select wp-knowledge-base.zip and click Install Now.
Activate
Click Activate Plugin. Creates the wp_wpkb_stats table for tracking article views and votes. Adds the manage_kb capability to Administrators.
Create Categories & Articles
Go to Knowledge Base → KB Categories to create topics. Then KB → Add New Article. Set the Difficulty and Last Reviewed date in the meta box.
Add Shortcodes to Pages
Place [kb_search] on your help centre page. Add [faq_accordion] to any FAQ page. Add the Popular Articles widget to a sidebar.
Plugin Features
Live Article Search
Searches KB articles by title and content via AJAX. Results appear instantly as you type.
Accordion FAQ
Clean accordion layout with configurable open state. Can show all closed, first open, or any specific item open.
Article Voting
Helpful / Not Helpful voting buttons injected into article content. Votes stored per user IP in the stats table.
View Tracking
Each article view is counted using ON DUPLICATE KEY UPDATE. Powers the Popular Articles widget.
Popular Articles Widget
Sidebar widget showing most-viewed articles. Results cached using WordPress transients.
Difficulty & Dates
Meta box lets editors set article difficulty (Beginner / Intermediate / Advanced) and Last Reviewed date.
REST API
Public GET /wpkb/v1/articles endpoint to query KB articles by category or search term.
KB Categories
Hierarchical taxonomy to organise articles by topic. Shown in the search bar filter and FAQ accordion.
FAQ Accordion Demo
Shortcodes & REST API
Knowledge Base Search
Renders a live search bar that queries KB articles. Results show title, excerpt, and a Read More link.
[kb_search] [kb_search placeholder="Find help…" limit="8"]
| Attribute | Default | Description |
|---|---|---|
placeholder | "Search articles…" | Placeholder text inside the search input. |
limit | 10 | Maximum number of results to show. |
FAQ Accordion
Renders an accessible accordion from KB articles in the specified category.
[faq_accordion] [faq_accordion category="billing" limit="10" open="-1"]
| Attribute | Default | Description |
|---|---|---|
category | all | KB Category slug to filter FAQ items. |
limit | 10 | Maximum number of FAQ items. |
open | -1 | -1 = all closed · 0 = first open · 2 = third item open. |
REST API
GET /wp-json/wpkb/v1/articles ?category=billing&search=payment&per_page=20