BasePress comes with three different knowledge base themes to choose from: Default, Modern and Zen. You can change your WordPress Knowledge base theme at any time, navigate to BasePress >Settings >Appearance (Prior to version 2.7.0 this tab was called “Aspect”) and select the theme you want to use from the menu.
Additionally BasePress gives you full control on the look of each KB theme, allowing you to personalize any of the the three themes even further. Below you can read more about basic or template customization for BasePress Themes.
Alternatively you can read how to create your own KB theme with simple templates.
In the Basepress Menu, you’ll find a menu item with the name of the theme you’re using. When you click on the name of the theme, a new window opens where you find extra customization tools like color-branding, font or font size, sticky side bar and more. The additional customization tools will depend on the theme you’re using.
BasePress themes use template files that determine the look of the different pages in the KB documentation.
There is a template to:
- display the list of your Knowledge Bases,
- one to show the list of the sections in the chosen Knowledge Base,
- one for displaying a list of articles for a single section,
- the templates to display articles
Every theme also has the necessary css file to style the look of the knowledge base and a function.php file in case you need to further customize its behavior.
All the files that make up a BasePress theme are grouped in a folder with the name of the theme. All default themes are inside the plugin files, in the folder “themes”.
To customize templates or extra files follow these steps:
- Open your WordPress theme folder
- Create a new folder called ‘basepress’
- Create inside the ‘basepress’ folder a new folder with the name of the knowledge base theme you want to customize
- Copy the file you want to customize from the original theme folder that you can find inside the plugin
- Paste the file in the new ‘basepress’ folder you created
- Make any changes you need to the newly created file
We can go through an example:
Let’s suppose you are using the ‘Default’ theme and you want to change the css file to give a different look to your knowledge base.
You would need to open your WordPress theme folder which is located at wordpress-folder/content/themes/your-theme-folder.
Then you will create a new folder called ‘basepress’ and inside of it create a new folder called ‘default’
You now need a copy of the original css file for the Default theme:
Open the plugin folder which is located at wordpress-folder/content/plugins/basepress/themes/default/css/style.css
You can copy the file and paste it inside the folder we created previously in your WordPress theme respecting the folder structure it is present in the original theme:
This means that you need to create a ‘css’ folder in your new theme and place inside of it the style.css file. The structure of the folder would look like this:
You can now modify this file at will and it would immediately apply to your KB.
Changing files in this way will guaranty that your changes remain in place when you update the plugin.
If your main WordPress theme receives updates, it is important that you create a child theme and place the ‘basepress’ folder in the child theme. This will avoid your customization to be removed when your main WordPress theme gets updated.
Information on how to create a WordPress child theme
When you want to customize a WordPress knowledge base theme, it’s useful to use a plugin that helps you find which template is used for any given page. A very recommended plugin for anything related to troubleshooting WordPress sites is Query Monitor. Once installed you will find a new menu item on your WordPress admin bar with many useful information. When you now visit any KB page you can click on the Query Monitor menu and under ‘Template’ see which template was used and where it’s located.