Intro to BasePress themes

BasePress comes with few basic themes to choose from. To change the theme used by the plugin go to BasePress->Settings->Aspect and select the theme you want to use from the menu.

BasePress was also designed to give you full control on the look of your knowledge base by allowing you to customize any of the already present themes or by creating your own with simple templates.

Customize a default knowledge base theme

BasePress themes are composed of template files that determine the look of the different pages in the knowledge base.
For instance there is a template used to:

  • display the list of your products,
  • one to show the list of the sections in the chosen product,
  • one for displaying a list of articles for a single section,
  • the templates to display articles
  • etc.

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 can be found inside the plugin files under the folder “themes”.
To customize any of the templates or extra files follow this instructions:

  1. Open your WordPress theme folder
  2. Create a new folder called ‘basepress’
  3. Create inside the ‘basepress’ folder a new folder with the name of the knowledge base theme you want to customize
  4. Copy the file you want to customize from the original theme folder that you can find inside the plugin
  5. Paste the file in the new ‘basepress’ folder you created
  6. make any changes you need to this file

We can go through an example to make this process clearer.

Lets 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 be applied to your knowledge base.
Changing files in this way will guaranty that any of your changes will remain in place when the plugin gets updated.
If your main WordPress theme would receive updates as well 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. Informations on how to create a WordPress child theme can be found here:

Creating a new Knowledge base theme

BasePress can have multiple themes in the themes folder. All available themes are listed in BasePress->Settings->Aspect where you can choose the one you want to use.
The theme can also be changed at any time as changing a theme would not change any content in your knowledge base.
While you may just want to use one of the already present themes you could also like to create a new one from scratch.

To create your own theme just follow this instructions:

  1. Open your WordPress theme folder
  2. Create a new folder called ‘basepress’
  3. Create inside the ‘basepress’ folder a new folder with the name of the knowledge base theme you want to create
  4. Place inside this folder all the necessary files that make up a theme

The easiest way to create a new theme is to copy all the files from one of the default themes that come with BasePress and replace the code in the files to your needs. This way you can be sure to have all the files needed.
When you create a new theme make sure to:

  1. Give your theme folder a unique name, different from other BasePress themes
  2. Add at the top of your theme’s css file the name of the theme as you want it to appear in the settings page, like in the example below. Only themes that have this variable will be recognised and used by BasePress.
    Theme Name: Your Theme Name

Was this helpful?