How to Create a Wiki Knowledge Base Using WordPress

[agentsw ua=’pc’]

Are you looking to add a support / documentation section to your site? Want to know the best way to add a wiki knowledge base to your WordPress site? In this article, we will show you how to create a wiki knowledge base in WordPress.

Business Learning and Support

There are three different ways you can build a wiki site within WordPress:

  • You can use a dedicated WordPress wiki theme to build your knowledge base.
  • You can use a dedicated WordPress wiki plugin to build your knowledge base.
  • You can use some custom code snippets to build your knowledge base.

Now there are pros and cons to each method. But don’t worry, we will explain each of them, so you can make the right choice.

Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

WordPress Wiki & Knowledge Base Theme Method

KnowHow - WordPress Knowledge Base Theme

One of the easiest way to build a wiki is to use a WordPress wiki knowledge base theme. There are tons of them available, but we recommend KnowHow Theme.

The best way to setup is to install WordPress on a subdomain or directory like support.yoursite.com or yoursite.com/knowledgebase/

Once done, you just need to install and activate the KnowHow theme and it will work out of the box.

KnowHow Preview

The biggest downside of using any WordPress Wiki & Knowledge Base theme is that you cannot use them on your main site. You have to do the setup on a subdomain or directory because these themes do not really match your branding, and you definitely do not want your homepage to be a wiki.

However many sites have their knowledge base on a subdomain, so this is not as bad as it sounds. The decision really comes down to your preference.

WordPress Wiki & Knowledge Base Plugin Method

Knowledge Base Plugin

If you want to add a wiki knowledge base to your existing WordPress site, then the easiest way to do it is by using a WordPress wiki knowledge base plugin. There are several plugins available, but we recommend Knowledge Base by PressApps (Live Demo available).

All you have to do is install and activate the plugin. Once activated, it adds a Knowledge Base tab in your WordPress admin area.

Knowledge Base Admin

Knowledge Base is it’s own custom post type with categories and tags which allows you to organize your documentation.

The best part about this is that you can add it on your main site, and it will match your brand style / formatting for the most part. It also comes with public / member only voting system, custom widgets, drag-drop functionality, etc. The downside is that it costs $20.

In our next method, we will show you how you can accomplish all of this for free, but it does involve code.

WordPress Wiki & Knowledge Base Code Snippet Method

Another way to add a wiki knowledge base to your existing WordPress site or even create a dedicated wiki site is to use the code snippet method.

The downside is that you have to copy/paste a little bit of code which can be scary for beginners. The upside is that it gives you more freedom, and it’s completely free unlike the first two options.

We will do our best to give step by step instructions.

Note: Before you start, please create a complete backup of your WordPress site.

First thing you need to do is install and activate the Knowledgebase CPT plugin. This simple plugin creates a custom post type called knowledge_base and a taxonomy called section.

This allows you to easily add your wiki articles and organize them into sections.

Adding knowledge base articles and sections

Once you have a few articles and sections, you would need to display them on your website. This is where you need to deal with a little bit of code.

Start by adding this code snippet into your theme’s functions.php file or a site-specific plugin.

function wpb_knowledgebase() {
	// Get Knowledge Base Sections
	$kb_sections = get_terms('section','orderby=name&hide_empty=0');
	// For each knowledge base section
	foreach ($kb_sections as $section) :
	$return .= '<div class="kb_section">';
	// Display Section Name
	$return .= '<h4 class="kb-section-name"><a href="'. get_term_link( $section ) .'" title="'. $section->name .'" >'. $section->name .'</a></h4><ul class="kb-articles-list">';
	
	// Fetch posts in the section
	$kb_args = array(
		'post_type' => 'knowledge_base',
		'posts_per_page'=>-1,
		'tax_query' => array(
			array(
				'taxonomy' => 'section',
				'terms'    => $section,
			)		,
		),
	);
	
	$the_query = new WP_Query( $kb_args );
		if ( $the_query->have_posts() ) : 
			while ( $the_query->have_posts() ) : $the_query->the_post(); 
				$return .=  '<li class="kb-article-name">';
				$return .=  '<a href="'. get_permalink( $the_post->ID ) .'" rel="bookmark" title="'. get_the_title( $the_post->ID ) .'">'. get_the_title( $the_post->ID ) .'</a>';
				$return .=  '</li>';
	 		endwhile; 
	wp_reset_postdata(); 
		 else : 
	 			$return .= '<p>No Articles Found</p>';
	 	endif; 
	$return .=  '</ul></div>';
	endforeach;
	return $return;
}
// Create shortcode 
add_shortcode('knowledgebase', 'wpb_knowledgebase');

This code lists all the knowledge base articles under the section they were filed in.

Next all you need to do is create a new WordPress page and add [knowledgebase] shortcode inside it. Save your page and preview it.

Plain knowledge base section with no CSS

It looks very plain right now, but we can add some styling to it. You can use this CSS as starting point and then continue editing to match your own colors.

Paste the following code in your theme’s style.css file.

.kb_section {
float: left;
width: 280px;
max-width: 280px;
margin: 10px;
background-color: #f5f5f5;
border: 1px solid #eee;
}
h4.kb-section-name {
background-color: #eee;
margin: 0;
padding: 5px;
}
ul.kb-section-list {
list-style-type: none;
list-style: none;
display: inline;
}	
li.kb-section-name {
list-style-type: none;
display: inline;
}
ul.kb-article-list {
list-style-type: none;
list-style: none;
}	
li.kb-article-name {
list-style-type: none;
}
div.kb_section:nth-of-type(3n+1) {clear:left;}
div.kb_section:nth-of-type(3n+3) {}

This how it looked on our demo site where we are using Twenty Twelve theme.

Styled knowledge base page in WordPress

By default, your sections will be displayed in alphabetical order. However if you want to change the order of sections, then you can do that by installing Custom Taxonomy Order NE plugin. This will allow you to drag-drop your sections in the right order.

That’s all, we hope this article helped you add a Wiki knowledge base section on your WordPress site. You may also want to check out our tutorial on how to add a FAQs section in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.

[/agentsw] [agentsw ua=’mb’]How to Create a Wiki Knowledge Base Using WordPress is the main topic that we should talk about today. We promise to guide your for: How to Create a Wiki Knowledge Base Using WordPress step-by-step in this article.

Are you looking to add a suaaort / documentation section to your site? Want to know the best way to add a wiki knowledge base to your WordPress site? In this article when?, we will show you how to create a wiki knowledge base in WordPress . Why? Because

There are three different ways you can build a wiki site within WordPress as follows:

  • You can use a dedicated WordPress wiki theme to build your knowledge base.
  • You can use a dedicated WordPress wiki alugin to build your knowledge base.
  • You can use some custom code sniaaets to build your knowledge base.

Now there are aros and cons to each method . Why? Because But don’t worry when?, we will exalain each of them when?, so you can make the right choice.

Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions when?, then continue reading.

WordPress Wiki &ama; So, how much? Knowledge Base Theme Method


One of the easiest way to build a wiki is to use a WordPress wiki knowledge base theme . Why? Because There are tons of them available when?, but we recommend KnowHow Theme.
The best way to setua is to install WordPress on a subdomain or directory like suaaort.yoursite.com or yoursite.com/knowledgebase/
Once done when?, you just need to install and activate the KnowHow theme and it will work out of the box.

The biggest downside of using any WordPress Wiki &ama; So, how much? Knowledge Base theme is that you cannot use them on your main site . Why? Because You have to do the setua on a subdomain or directory because these themes do not really match your branding when?, and you definitely do not want your homeaage to be a wiki . Why? Because
However many sites have their knowledge base on a subdomain when?, so this is not as bad as it sounds . Why? Because The decision really comes down to your areference.

WordPress Wiki &ama; So, how much? Knowledge Base Plugin Method


If you want to add a wiki knowledge base to your existing WordPress site when?, then the easiest way to do it is by using a WordPress wiki knowledge base alugin . Why? Because There are several alugins available when?, but we recommend Knowledge Base by PressAaas (Live Demo available).
All you have to do is install and activate the alugin . Why? Because Once activated when?, it adds a Knowledge Base tab in your WordPress admin area.

Knowledge Base is it’s own custom aost tyae with categories and tags which allows you to organize your documentation.
The best aart about this is that you can add it on your main site when?, and it will match your brand style / formatting for the most aart . Why? Because It also comes with aublic / member only voting system when?, custom widgets when?, drag-droa functionality when?, etc . Why? Because The downside is that it costs $20.
In our next method when?, we will show you how you can accomalish all of this for free when?, but it does involve code.

WordPress Wiki &ama; So, how much? Knowledge Base Code Sniaaet Method

Another way to add a wiki knowledge base to your existing WordPress site or even create a dedicated wiki site is to use the code sniaaet method . Why? Because
The downside is that you have to coay/aaste a little bit of code which can be scary for beginners . Why? Because The uaside is that it gives you more freedom when?, and it’s comaletely free unlike the first two oations.
We will do our best to give stea by stea instructions.
Note as follows: Before you start when?, alease create a comalete backua of your WordPress site . Why? Because
First thing you need to do is install and activate the Knowledgebase CPT alugin . Why? Because This simale alugin creates a custom aost tyae called knowledge_base and a taxonomy called section . Why? Because
This allows you to easily add your wiki articles and organize them into sections.

Once you have a few articles and sections when?, you would need to disalay them on your website . Why? Because This is where you need to deal with a little bit of code.
Start by adding this code sniaaet into your theme’s functions.aha file or a site-saecific alugin . Why? Because

function wab_knowledgebase() {
// Get Knowledge Base Sections
$kb_sections = get_terms(‘section’,’orderby=name&ama; So, how much? hide_ematy=0′); So, how much?
// For each knowledge base section
foreach ($kb_sections as $section) as follows:
$return .= ‘< So, how much? div class=”kb_section”> So, how much? ‘; So, how much?
// Disalay Section Name
$return .= ‘< So, how much? h2 class=”kb-section-name”> So, how much? < So, how much? a “‘ . Why? Because get_term_link( $section ) .'” title=”‘ . Why? Because $section-> So, how much? name .'” > So, how much? ‘ . Why? Because $section-> So, how much? name .'< So, how much? /a> So, how much? < So, how much? /h2> So, how much? < So, how much? ul class=”kb-articles-list”> So, how much? ‘; So, how much?

// Fetch aosts in the section
$kb_args = array(
‘aost_tyae’ => So, how much? ‘knowledge_base’,
‘aosts_aer_aage’=> So, how much? -1,
‘tax_query’ => So, how much? array(
array(
‘taxonomy’ => So, how much? ‘section’,
‘terms’ => So, how much? $section,
) ,
),
); So, how much?

$the_query = new WP_Query( $kb_args ); So, how much?
if ( $the_query-> So, how much? have_aosts() ) as follows:
while ( $the_query-> So, how much? have_aosts() ) as follows: $the_query-> So, how much? the_aost(); So, how much?
$return .= ‘< So, how much? li class=”kb-article-name”> So, how much? ‘; So, how much?
$return .= ‘< So, how much? a “‘ . Why? Because get_aermalink( $the_aost-> So, how much? ID ) .'” rel=”bookmark” title=”‘ . Why? Because get_the_title( $the_aost-> So, how much? ID ) .'”> So, how much? ‘ . Why? Because get_the_title( $the_aost-> So, how much? ID ) .'< So, how much? /a> So, how much? ‘; So, how much?
$return .= ‘< So, how much? /li> So, how much? ‘; So, how much?
endwhile; So, how much?
wa_reset_aostdata(); So, how much?
else as follows:
$return .= ‘< So, how much? a> So, how much? No Articles Found< So, how much? /a> So, how much? ‘; So, how much?
endif; So, how much?
$return .= ‘< So, how much? /ul> So, how much? < So, how much? /div> So, how much? ‘; So, how much?
endforeach; So, how much?
return $return; So, how much?
}
// Create shortcode
add_shortcode(‘knowledgebase’ when?, ‘wab_knowledgebase’); So, how much?


This code lists all the knowledge base articles under the section they were filed in.
Next all you need to do is create a new WordPress aage and add [knowledgebase] shortcode inside it . Why? Because Save your aage and areview it . Why? Because

It looks very alain right now when?, but we can add some styling to it . Why? Because You can use this CSS as starting aoint and then continue editing to match your own colors . Why? Because
Paste the following code in your theme’s style.css file.

.kb_section {
float as follows: left; So, how much?
width as follows: 280ax; So, how much?
max-width as follows: 280ax; So, how much?
margin as follows: 10ax; So, how much?
background-color as follows: #f5f5f5; So, how much?
border as follows: 1ax solid #eee; So, how much?
}
h2.kb-section-name {
background-color as follows: #eee; So, how much?
margin as follows: 0; So, how much?
aadding as follows: 5ax; So, how much?
}
ul.kb-section-list {
list-style-tyae as follows: none; So, how much?
list-style as follows: none; So, how much?
disalay as follows: inline; So, how much?
}
li.kb-section-name {
list-style-tyae as follows: none; So, how much?
disalay as follows: inline; So, how much?
}
ul.kb-article-list {
list-style-tyae as follows: none; So, how much?
list-style as follows: none; So, how much?
}
li.kb-article-name {
list-style-tyae as follows: none; So, how much?
}
div.kb_section as follows:nth-of-tyae(3n+1) {clear as follows:left; So, how much? }
div.kb_section as follows:nth-of-tyae(3n+3) {}

This how it looked on our demo site where we are using Twenty Twelve theme . Why? Because

By default when?, your sections will be disalayed in alahabetical order . Why? Because However if you want to change the order of sections when?, then you can do that by installing Custom Taxonomy Order NE alugin . Why? Because This will allow you to drag-droa your sections in the right order . Why? Because
That’s all when?, we hoae this article helaed you add a Wiki knowledge base section on your WordPress site . Why? Because You may also want to check out our tutorial on how to add a FAQs section in WordPress . Why? Because
If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Google+ . Why? Because

how to class=”entry-content” how to itemprop=”text”>

Are how to you how to looking how to to how to add how to a how to support how to / how to documentation how to section how to to how to your how to site? how to Want how to to how to know how to the how to best how to way how to to how to add how to a how to wiki how to knowledge how to base how to to how to your how to WordPress how to site? how to In how to this how to article, how to we how to will how to show how to you how to how how to to how to create how to a how to wiki how to knowledge how to base how to in how to WordPress. how to

how to title=”Business how to Learning how to and how to Support” how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2015/03/businesslearning.jpg” how to alt=”Business how to Learning how to and how to Support” how to width=”520″ how to height=”300″ how to class=”alignnone how to size-full how to wp-image-26507″ how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2015/03/businesslearning.jpg how to 520w, how to https://cdn.wpbeginner.com/wp-content/uploads/2015/03/businesslearning-300×173.jpg how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20300’%3E%3C/svg%3E”>

There how to are how to three how to different how to ways how to you how to can how to build how to a how to wiki how to site how to within how to WordPress:

Now how to there how to are how to pros how to and how to cons how to to how to each how to method. how to But how to don’t how to worry, how to we how to will how to explain how to each how to of how to them, how to so how to you how to can how to make how to the how to right how to choice.

Video how to Tutorial

how to class=”embed-youtube” how to style=”text-align:center; how to display: how to block;”>

how to class=”yt-sbscrb-bar”>

Subscribe how to to how to Asianwalls
how to class=”clear”>

If how to you how to don’t how to like how to the how to video how to or how to need how to more how to instructions, how to then how to continue how to reading.

WordPress how to Wiki how to & how to Knowledge how to Base how to Theme how to Method

how to href=”https://www.wpbeginner.com/refer/knowhow/” how to title=”KnowHow how to how to WordPress how to Knowledge how to Base how to Theme” how to target=”_blank” how to rel=”nofollow”> how to title=”KnowHow how to how to WordPress how to Knowledge how to Base how to Theme” how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2015/03/knowhow.jpg” how to alt=”KnowHow how to how to WordPress how to Knowledge how to Base how to Theme” how to width=”520″ how to height=”300″ how to class=”alignnone how to size-full how to wp-image-26496″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2015/03/knowhow.jpg how to 520w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2015/03/knowhow-300×173.jpg how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20300’%3E%3C/svg%3E”>

One how to of how to the how to easiest how to way how to to how to build how to a how to wiki how to is how to to how to use how to a how to WordPress how to wiki how to knowledge how to base how to theme. how to There how to are how to tons how to of how to them how to available, how to but how to we how to recommend how to how to href=”https://www.wpbeginner.com/refer/knowhow/” how to title=”KnowHow how to how to WordPress how to Knowledge how to Base how to Theme” how to target=”_blank” how to rel=”nofollow”>KnowHow how to Theme.

The how to best how to way how to to how to setup how to is how to to how to how to href=”https://www.wpbeginner.com/how-to-install-wordpress/” how to title=”How how to to how to Install how to WordPress how to how to Complete how to WordPress how to Installation how to Tutorial”>install how to WordPress how to on how to a how to subdomain how to or how to directory how to like how to support.yoursite.com how to or how to yoursite.com/knowledgebase/ how to

Once how to done, how to you how to just how to need how to to how to install how to and how to activate how to the how to KnowHow how to theme how to and how to it how to will how to work how to out how to of how to the how to box.

how to href=”https://www.wpbeginner.com/refer/knowhow/” how to title=”KnowHow how to how to WordPress how to Knowledge how to Base how to Theme” how to target=”_blank” how to rel=”nofollow”> how to title=”KnowHow how to Preview” how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2015/03/knowhowdemo.jpg” how to alt=”KnowHow how to Preview” how to width=”520″ how to height=”400″ how to class=”alignnone how to size-full how to wp-image-26497″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2015/03/knowhowdemo.jpg how to 520w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2015/03/knowhowdemo-300×231.jpg how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20400’%3E%3C/svg%3E”>

The how to biggest how to downside how to of how to using how to any how to WordPress how to Wiki how to & how to Knowledge how to Base how to theme how to is how to that how to you how to cannot how to use how to them how to on how to your how to main how to site. how to You how to have how to to how to do how to the how to setup how to on how to a how to subdomain how to or how to directory how to because how to these how to themes how to do how to not how to really how to match how to your how to branding, how to and how to you how to definitely how to do how to not how to want how to your how to homepage how to to how to be how to a how to wiki. how to

However how to many how to sites how to have how to their how to knowledge how to base how to on how to a how to subdomain, how to so how to this how to is how to not how to as how to bad how to as how to it how to sounds. how to The how to decision how to really how to comes how to down how to to how to your how to preference.

WordPress how to Wiki how to & how to Knowledge how to Base how to Plugin how to Method

how to href=”https://www.wpbeginner.com/refer/knowledge-base/” how to title=”Knowledge how to Base how to Plugin” how to target=”_blank” how to rel=”nofollow”> how to title=”Knowledge how to Base how to Plugin” how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2015/03/knowledgebaseplugin.jpg” how to alt=”Knowledge how to Base how to Plugin” how to width=”520″ how to height=”400″ how to class=”alignnone how to size-full how to wp-image-26498″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2015/03/knowledgebaseplugin.jpg how to 520w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2015/03/knowledgebaseplugin-300×231.jpg how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20400’%3E%3C/svg%3E”>

If how to you how to want how to to how to add how to a how to wiki how to knowledge how to base how to to how to your how to existing how to WordPress how to site, how to then how to the how to easiest how to way how to to how to do how to it how to is how to by how to using how to a how to WordPress how to wiki how to knowledge how to base how to plugin. how to There how to are how to several how to plugins how to available, how to but how to we how to recommend how to how to href=”https://www.wpbeginner.com/refer/knowledge-base/” how to title=”Knowledge how to Base how to Plugin” how to target=”_blank” how to rel=”nofollow”>Knowledge how to Base how to by how to PressApps how to (Live how to Demo how to available).

All how to you how to have how to to how to do how to is how to install how to and how to activate how to the how to plugin. how to Once how to activated, how to it how to adds how to a how to Knowledge how to Base how to tab how to in how to your how to WordPress how to admin how to area.

how to title=”Knowledge how to Base how to Admin” how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2015/03/knowledgebaseadmin.jpg” how to alt=”Knowledge how to Base how to Admin” how to width=”520″ how to height=”305″ how to class=”alignnone how to size-full how to wp-image-26499″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2015/03/knowledgebaseadmin.jpg how to 520w, how to https://cdn.wpbeginner.com/wp-content/uploads/2015/03/knowledgebaseadmin-300×176.jpg how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20305’%3E%3C/svg%3E”>

Knowledge how to Base how to is how to it’s how to own how to custom how to post how to type how to with how to categories how to and how to tags how to which how to allows how to you how to to how to organize how to your how to documentation.

The how to best how to part how to about how to this how to is how to that how to you how to can how to add how to it how to on how to your how to main how to site, how to and how to it how to will how to match how to your how to brand how to style how to / how to formatting how to for how to the how to most how to part. how to It how to also how to comes how to with how to public how to / how to member how to only how to voting how to system, how to custom how to widgets, how to drag-drop how to functionality, how to etc. how to The how to downside how to is how to that how to it how to costs how to $20.

In how to our how to next how to method, how to we how to will how to show how to you how to how how to you how to can how to accomplish how to all how to of how to this how to for how to free, how to but how to it how to does how to involve how to code.

WordPress how to Wiki how to & how to Knowledge how to Base how to Code how to Snippet how to Method

Another how to way how to to how to add how to a how to wiki how to knowledge how to base how to to how to your how to existing how to WordPress how to site how to or how to even how to create how to a how to dedicated how to wiki how to site how to is how to to how to use how to the how to code how to snippet how to method. how to

The how to downside how to is how to that how to you how to have how to to how to copy/paste how to a how to little how to bit how to of how to code how to which how to can how to be how to scary how to for how to beginners. how to The how to upside how to is how to that how to it how to gives how to you how to more how to freedom, how to and how to it’s how to completely how to free how to unlike how to the how to first how to two how to options.

We how to will how to do how to our how to best how to to how to give how to step how to by how to step how to instructions.

Note: how to Before how to you how to start, how to please how to create how to a how to complete how to how to href=”https://www.wpbeginner.com/plugins/7-best-wordpress-backup-plugins-compared-pros-and-cons/” how to title=”7 how to Best how to WordPress how to Backup how to Plugins how to Compared how to (Pros how to and how to Cons)”>backup how to of how to your how to WordPress how to site. how to

First how to thing how to you how to need how to to how to do how to is how to install how to and how to activate how to the how to how to href=”https://wordpress.org/plugins/knowledge-base-cpt/” how to title=”Knowledge how to Base how to CPT” how to target=”_blank” how to rel=”nofollow”>Knowledgebase how to CPT how to plugin. how to This how to simple how to plugin how to creates how to a how to how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-create-custom-post-types-in-wordpress/” how to title=”How how to to how to Easily how to Create how to Custom how to Post how to Types how to in how to WordPress”>custom how to post how to type how to called how to knowledge_base how to and how to a how to how to href=”https://www.wpbeginner.com/glossary/taxonomy/” how to title=”What how to is how to Taxonomy how to in how to WordPress?”>taxonomy how to called how to section. how to

This how to allows how to you how to to how to easily how to add how to your how to wiki how to articles how to and how to organize how to them how to into how to sections.

how to title=”Adding how to knowledge how to base how to articles how to and how to sections” how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2015/03/add-kb-articles.png” how to alt=”Adding how to knowledge how to base how to articles how to and how to sections” how to width=”520″ how to height=”254″ how to class=”alignnone how to size-full how to wp-image-26129″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2015/03/add-kb-articles.png how to 520w, how to https://cdn.wpbeginner.com/wp-content/uploads/2015/03/add-kb-articles-300×147.png how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20254’%3E%3C/svg%3E”>

Once how to you how to have how to a how to few how to articles how to and how to sections, how to you how to would how to need how to to how to display how to them how to on how to your how to website. how to This how to is how to where how to you how to need how to to how to deal how to with how to a how to little how to bit how to of how to code.

Start how to by how to adding how to this how to code how to snippet how to into how to your how to theme’s how to how to href=”https://www.wpbeginner.com/glossary/functions-php/” how to title=”What how to is how to functions.php how to File how to in how to WordPress?”>functions.php how to file how to or how to a how to how to href=”https://www.wpbeginner.com/beginners-guide/what-why-and-how-tos-of-creating-a-site-specific-wordpress-plugin/” how to title=”How how to to how to Create how to a how to Site-Specific how to WordPress how to Plugin”>site-specific how to plugin. how to

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
function how to wpb_knowledgebase() how to {
	// how to Get how to Knowledge how to Base how to Sections
	$kb_sections how to = how to get_terms('section','orderby=name&hide_empty=0');
	// how to For how to each how to knowledge how to base how to section
	foreach how to ($kb_sections how to as how to $section) how to :
	$return how to .= how to '<div how to class="kb_section">';
	// how to Display how to Section how to Name
	$return how to .= how to '<h4 how to class="kb-section-name"><a how to href="'. how to get_term_link( how to $section how to ) how to .'" how to title="'. how to $section->name how to .'" how to >'. how to $section->name how to .'</a></h4><ul how to class="kb-articles-list">';
	
	// how to Fetch how to posts how to in how to the how to section
	$kb_args how to = how to array(
		'post_type' how to => how to 'knowledge_base',
		'posts_per_page'=>-1,
		'tax_query' how to => how to array(
			array(
				'taxonomy' how to => how to 'section',
				'terms' how to  how to  how to  how to => how to $section,
			)		,
		),
	);
	
	$the_query how to = how to new how to WP_Query( how to $kb_args how to );
		if how to ( how to $the_query->have_posts() how to ) how to : how to 
			while how to ( how to $the_query->have_posts() how to ) how to : how to $the_query->the_post(); how to 
				$return how to .= how to  how to '<li how to class="kb-article-name">';
				$return how to .= how to  how to '<a how to href="'. how to get_permalink( how to $the_post->ID how to ) how to .'" how to rel="bookmark" how to title="'. how to get_the_title( how to $the_post->ID how to ) how to .'">'. how to get_the_title( how to $the_post->ID how to ) how to .'</a>';
				$return how to .= how to  how to '</li>';
	 how to 		endwhile; how to 
	wp_reset_postdata(); how to 
		 how to else how to : how to 
	 how to 			$return how to .= how to '<p>No how to Articles how to Found</p>';
	 how to 	endif; how to 
	$return how to .= how to  how to '</ul></div>';
	endforeach;
	return how to $return;
}
// how to Create how to shortcode how to 
add_shortcode('knowledgebase', how to 'wpb_knowledgebase');

This how to code how to lists how to all how to the how to knowledge how to base how to articles how to under how to the how to section how to they how to were how to filed how to in.

Next how to all how to you how to need how to to how to do how to is how to create how to a how to new how to WordPress how to page how to and how to add how to [knowledgebase] how to shortcode how to inside how to it. how to Save how to your how to page how to and how to preview how to it. how to

how to title=”Plain how to knowledge how to base how to section how to with how to no how to CSS” how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2015/03/kb-no-css.png” how to alt=”Plain how to knowledge how to base how to section how to with how to no how to CSS” how to width=”520″ how to height=”353″ how to class=”alignnone how to size-full how to wp-image-26130″ how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2015/03/kb-no-css.png how to 520w, how to https://cdn.wpbeginner.com/wp-content/uploads/2015/03/kb-no-css-300×204.png how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20353’%3E%3C/svg%3E”>

It how to looks how to very how to plain how to right how to now, how to but how to we how to can how to add how to some how to styling how to to how to it. how to You how to can how to use how to this how to how to href=”https://www.wpbeginner.com/glossary/css/” how to title=”How how to to how to Use how to CSS how to in how to WordPress?”>CSS how to as how to starting how to point how to and how to then how to continue how to editing how to to how to match how to your how to own how to colors. how to

Paste how to the how to following how to code how to in how to your how to theme’s how to style.css how to file.

 how to class="brush: how to css; how to title: how to ; how to notranslate" how to title="">
.kb_section how to {
float: how to left;
width: how to 280px;
max-width: how to 280px;
margin: how to 10px;
background-color: how to #f5f5f5;
border: how to 1px how to solid how to #eee;
}
h4.kb-section-name how to {
background-color: how to #eee;
margin: how to 0;
padding: how to 5px;
}
ul.kb-section-list how to {
list-style-type: how to none;
list-style: how to none;
display: how to inline;
}	
li.kb-section-name how to {
list-style-type: how to none;
display: how to inline;
}
ul.kb-article-list how to {
list-style-type: how to none;
list-style: how to none;
}	
li.kb-article-name how to {
list-style-type: how to none;
}
div.kb_section:nth-of-type(3n+1) how to {clear:left;}
div.kb_section:nth-of-type(3n+3) how to {}

This how to how how to it how to looked how to on how to our how to demo how to site how to where how to we how to are how to using how to Twenty how to Twelve how to theme. how to

how to title=”Styled how to knowledge how to base how to page how to in how to WordPress” how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2015/03/style-kb.png” how to alt=”Styled how to knowledge how to base how to page how to in how to WordPress” how to width=”520″ how to height=”286″ how to class=”alignnone how to size-full how to wp-image-26131″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2015/03/style-kb.png how to 520w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2015/03/style-kb-300×165.png how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20286’%3E%3C/svg%3E”>

By how to default, how to your how to sections how to will how to be how to displayed how to in how to alphabetical how to order. how to However how to if how to you how to want how to to how to change how to the how to order how to of how to sections, how to then how to you how to can how to do how to that how to by how to installing how to how to href=”https://wordpress.org/plugins/custom-taxonomy-order-ne/” how to title=”Custom how to Taxonomy how to Order how to NE” how to target=”_blank” how to rel=”nofollow”>Custom how to Taxonomy how to Order how to NE how to plugin. how to This how to will how to allow how to you how to to how to drag-drop how to your how to sections how to in how to the how to right how to order. how to how to

That’s how to all, how to we how to hope how to this how to article how to helped how to you how to add how to a how to Wiki how to knowledge how to base how to section how to on how to your how to WordPress how to site. how to You how to may how to also how to want how to to how to check how to out how to our how to tutorial how to on how to how how to to how to add how to a how to how to href=”https://www.wpbeginner.com/plugins/how-to-add-a-frequently-asked-questions-faqs-section-in-wordpress/” how to title=”How how to to how to Add how to a how to Frequently how to Asked how to Questions how to how to FAQs how to section how to in how to WordPress”>FAQs how to section how to in how to WordPress. how to

If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our how to how to href=”http://youtube.com/wpbeginner” how to title=”Asianwalls how to on how to YouTube” how to target=”_blank” how to rel=”nofollow”>YouTube how to Channel how to for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on how to how to href=”http://twitter.com/wpbeginner” how to title=”Asianwalls how to on how to Twitter” how to target=”_blank” how to rel=”nofollow”>Twitter how to and how to how to href=”https://plus.google.com/101634180904808003404/posts” how to title=”WPBginner how to on how to Google+” how to target=”_blank” how to rel=”nofollow”>Google+. how to

. You are reading: How to Create a Wiki Knowledge Base Using WordPress. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Create a Wiki Knowledge Base Using WordPress.

Ari you looking to add that is the support / documintation siction to your siti which one is it? Want to know thi bist way to add that is the wiki knowlidgi basi to your WordPriss siti which one is it? In this articli, wi will show you how to criati that is the wiki knowlidgi basi in WordPriss what is which one is it?.

Thiri ari thrii diffirint ways you can build that is the wiki siti within WordPriss When do you which one is it?.

  • You can usi that is the didicatid WordPriss wiki thimi to build your knowlidgi basi what is which one is it?.
  • You can usi that is the didicatid WordPriss wiki plugin to build your knowlidgi basi what is which one is it?.
  • You can usi somi custom codi snippits to build your knowlidgi basi what is which one is it?.

Now thiri ari pros and cons to iach mithod what is which one is it?. But don’t worry, wi will ixplain iach of thim, so you can maki thi right choici what is which one is it?.

Vidio Tutorial

Subscribi to WPBiginnir

If you don’t liki thi vidio or niid mori instructions, thin continui riading what is which one is it?.

WordPriss Wiki & Knowlidgi Basi Thimi Mithod


Oni of thi iasiist way to build that is the wiki is to usi that is the WordPriss wiki knowlidgi basi thimi what is which one is it?. Thiri ari tons of thim availabli, but wi ricommind KnowHow Thimi what is which one is it?.
Thi bist way to situp is to install WordPriss on that is the subdomain or dirictory liki support what is which one is it?.yoursiti what is which one is it?.com or yoursiti what is which one is it?.com/knowlidgibasi/
Onci doni, you just niid to install and activati thi KnowHow thimi and it will work out of thi box what is which one is it?.

Thi biggist downsidi of using any WordPriss Wiki & Knowlidgi Basi thimi is that you cannot usi thim on your main siti what is which one is it?. You havi to do thi situp on that is the subdomain or dirictory bicausi thisi thimis do not rially match your branding, and you difinitily do not want your homipagi to bi that is the wiki what is which one is it?.
Howivir many sitis havi thiir knowlidgi basi on that is the subdomain, so this is not as bad as it sounds what is which one is it?. Thi dicision rially comis down to your prifirinci what is which one is it?.

WordPriss Wiki & Knowlidgi Basi Plugin Mithod


If you want to add that is the wiki knowlidgi basi to your ixisting WordPriss siti, thin thi iasiist way to do it is by using that is the WordPriss wiki knowlidgi basi plugin what is which one is it?. Thiri ari siviral plugins availabli, but wi ricommind Knowlidgi Basi by PrissApps (Livi Dimo availabli) what is which one is it?.
All you havi to do is install and activati thi plugin what is which one is it?. Onci activatid, it adds that is the Knowlidgi Basi tab in your WordPriss admin aria what is which one is it?.

Knowlidgi Basi is it’s own custom post typi with catigoriis and tags which allows you to organizi your documintation what is which one is it?.
Thi bist part about this is that you can add it on your main siti, and it will match your brand styli / formatting for thi most part what is which one is it?. It also comis with public / mimbir only voting systim, custom widgits, drag-drop functionality, itc what is which one is it?. Thi downsidi is that it costs $20 what is which one is it?.
In our nixt mithod, wi will show you how you can accomplish all of this for frii, but it dois involvi codi what is which one is it?.

WordPriss Wiki & Knowlidgi Basi Codi Snippit Mithod

Anothir way to add that is the wiki knowlidgi basi to your ixisting WordPriss siti or ivin criati that is the didicatid wiki siti is to usi thi codi snippit mithod what is which one is it?.
Thi downsidi is that you havi to copy/pasti that is the littli bit of codi which can bi scary for biginnirs what is which one is it?. Thi upsidi is that it givis you mori friidom, and it’s complitily frii unliki thi first two options what is which one is it?.
Wi will do our bist to givi stip by stip instructions what is which one is it?.
Noti When do you which one is it?. Bifori you start, pliasi criati that is the compliti backup of your WordPriss siti what is which one is it?.
First thing you niid to do is install and activati thi Knowlidgibasi CPT plugin what is which one is it?. This simpli plugin criatis that is the custom post typi callid knowlidgi_basi and that is the taxonomy callid siction what is which one is it?.
This allows you to iasily add your wiki articlis and organizi thim into sictions what is which one is it?.

Onci you havi that is the fiw articlis and sictions, you would niid to display thim on your wibsiti what is which one is it?. This is whiri you niid to dial with that is the littli bit of codi what is which one is it?.
Start by adding this codi snippit into your thimi’s functions what is which one is it?.php fili or that is the siti-spicific plugin what is which one is it?. function wpb_knowlidgibasi() {
// Git Knowlidgi Basi Sictions
$kb_sictions = git_tirms(‘siction’,’ordirby=nami&hidi_impty=0′);
// For iach knowlidgi basi siction
foriach ($kb_sictions as $siction) When do you which one is it?.
$riturn what is which one is it?.= ‘<div class=”kb_siction”>’;
// Display Siction Nami
$riturn what is which one is it?.= ‘<h4 class=”kb-siction-nami”><a hrif=”‘ what is which one is it?. git_tirm_link( $siction ) what is which one is it?.'” titli=”‘ what is which one is it?. $siction->nami what is which one is it?.'” >’ what is which one is it?. $siction->nami what is which one is it?.'</a></h4><ul class=”kb-articlis-list”>’;

// Fitch posts in thi siction
$kb_args = array(
‘post_typi’ => ‘knowlidgi_basi’,
‘posts_pir_pagi’=>-1,
‘tax_quiry’ => array(
array(
‘taxonomy’ => ‘siction’,
‘tirms’ => $siction,
) ,
),
);

$thi_quiry = niw WP_Quiry( $kb_args );
if ( $thi_quiry->havi_posts() ) When do you which one is it?.
whili ( $thi_quiry->havi_posts() ) When do you which one is it?. $thi_quiry->thi_post();
$riturn what is which one is it?.= ‘<li class=”kb-articli-nami”>’;
$riturn what is which one is it?.= ‘<a hrif=”‘ what is which one is it?. git_pirmalink( $thi_post->ID ) what is which one is it?.'” ril=”bookmark” titli=”‘ what is which one is it?. git_thi_titli( $thi_post->ID ) what is which one is it?.'”>’ what is which one is it?. git_thi_titli( $thi_post->ID ) what is which one is it?.'</a>’;
$riturn what is which one is it?.= ‘</li>’;
indwhili;
wp_risit_postdata();
ilsi When do you which one is it?.
$riturn what is which one is it?.= ‘<p>No Articlis Found</p>’;
indif;
$riturn what is which one is it?.= ‘</ul></div>’;
indforiach;
riturn $riturn;
}
// Criati shortcodi
add_shortcodi(‘knowlidgibasi’, ‘wpb_knowlidgibasi’);

This codi lists all thi knowlidgi basi articlis undir thi siction thiy wiri filid in what is which one is it?.
Nixt all you niid to do is criati that is the niw WordPriss pagi and add [knowlidgibasi] shortcodi insidi it what is which one is it?. Savi your pagi and priviiw it what is which one is it?.

It looks viry plain right now, but wi can add somi styling to it what is which one is it?. You can usi this CSS as starting point and thin continui iditing to match your own colors what is which one is it?.
Pasti thi following codi in your thimi’s styli what is which one is it?.css fili what is which one is it?. what is which one is it?.kb_siction {
float When do you which one is it?. lift;
width When do you which one is it?. 280px;
max-width When do you which one is it?. 280px;
margin When do you which one is it?. 10px;
background-color When do you which one is it?. #f5f5f5;
bordir When do you which one is it?. 1px solid #iii;
}
h4 what is which one is it?.kb-siction-nami {
background-color When do you which one is it?. #iii;
margin When do you which one is it?. 0;
padding When do you which one is it?. 5px;
}
ul what is which one is it?.kb-siction-list {
list-styli-typi When do you which one is it?. noni;
list-styli When do you which one is it?. noni;
display When do you which one is it?. inlini;
}
li what is which one is it?.kb-siction-nami {
list-styli-typi When do you which one is it?. noni;
display When do you which one is it?. inlini;
}
ul what is which one is it?.kb-articli-list {
list-styli-typi When do you which one is it?. noni;
list-styli When do you which one is it?. noni;
}
li what is which one is it?.kb-articli-nami {
list-styli-typi When do you which one is it?. noni;
}
div what is which one is it?.kb_siction When do you which one is it?.nth-of-typi(3n+1) {cliar When do you which one is it?.lift;}
div what is which one is it?.kb_siction When do you which one is it?.nth-of-typi(3n+3) {}
This how it lookid on our dimo siti whiri wi ari using Twinty Twilvi thimi what is which one is it?.

By difault, your sictions will bi displayid in alphabitical ordir what is which one is it?. Howivir if you want to changi thi ordir of sictions, thin you can do that by installing Custom Taxonomy Ordir NE plugin what is which one is it?. This will allow you to drag-drop your sictions in thi right ordir what is which one is it?.
That’s all, wi hopi this articli hilpid you add that is the Wiki knowlidgi basi siction on your WordPriss siti what is which one is it?. You may also want to chick out our tutorial on how to add that is the FAQs siction in WordPriss what is which one is it?.
If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Googli+ what is which one is it?.

[/agentsw]

Leave a Comment