Below is the list of all necessary files that make up a theme. You should not remove or skip any of these files when you want to create custom knowledge base themes. You are free to add any extra files if your design requires it.
- css folder
This contains the main theme styles.
icons.css(deprecated. Icons are now managed with the new Icons Manager under Basepress menu)
This contains the icon classes
icons folder(deprecated as above)
This contains the icons fonts and a xml file listing the icons and where they will be used. More about icons later on.
- template-parts folder. This folder contains the templates for the various pages content.
This file renders the post content.
This file generates the content of a multi sections page. It should list all sections with their articles.
This file generates the content of a multi sections page in boxed style. It shouldn’t show the list of articles.
This file generates the content of a single section page. It should list all articles of the current section.
This files renders the table of content in the articles body.
These files render the next and previous articles navigation.
(BasePress was originally created as a Multi Product KB so this file remains called products.php for backward compatibility)
This template is responsible for generating the Knowledge base entry page and is called by the ‘basepress’ shortcode. It should render at least the Knowledge Bases grid.
Further content can be place in this file or directly in the Knowledge base page that contains the shortcode.
This is the main template file responsible to generate the Knowledge base sections pages in list style. It should render the main content of multi sections pages and call the ‘sections-content.php’ file.
This is the main template file responsible to generate the Knowledge base sections pages in a boxed style. It should render the main content of multi sections pages and call the ‘sections-content-boxed.php’ file.
This is the main template file responsible to generate a single section page of the Knowledge base. It should render the main content of single section page and call the ‘single-section-content.php’ file.
This template renders the post page without sidebar. It is a mandatory page template, this is the default template if no template has been selected for a post.
This template renders the post with a left sidebar. This template is optional.
This template renders the post with a right sidebar. This template is optional.
This is the main template file responsible to generate the search results for the knowledge base. It should render the main loop for a search result.
This is similar to the search template but used for global searches: searches that include all Knowledge Bases.
This is the template for the article’s comments.
This is the template that renders an article with the restricted content notice. It is called every time someone as reached a restricted article.
Use this file to run any custom code just like the function.php file found in any WordPress theme.