{"id":404,"date":"2017-03-13T17:42:43","date_gmt":"2017-03-13T16:42:43","guid":{"rendered":"https:\/\/codesavory.com\/demo\/?post_type=knowledgebase&#038;p=404"},"modified":"2020-04-22T15:15:37","modified_gmt":"2020-04-22T13:15:37","slug":"theme-files","status":"publish","type":"knowledgebase","link":"https:\/\/basepresskb.com\/docs\/knowledge-base\/basepress-themes\/theme-files\/","title":{"rendered":"Theme files"},"content":{"rendered":"<p><a href=\"https:\/\/basepresskb.com\/docs\/knowledge-base\/basepress-themes\/\">BasePress knowledge base themes<\/a> are easy to create as they don&#8217;t differ much from <a href=\"https:\/\/codex.wordpress.org\/Theme_Development\">WordPress themes<\/a>.<\/p>\n<p>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 <a href=\"https:\/\/basepresskb.com\/docs\/knowledge-base\/basepress-themes\/create-new-theme\/\">create custom knowledge base themes<\/a>. You are free to add any extra files if your design requires it.<\/p>\n<ul>\n<li><b>css <\/b>folder\n<ul>\n<li><b>style.css<\/b><br \/>\nThis contains the main theme styles.<\/li>\n<li><del><b>icons.css<\/b><\/del><b> <\/b>(deprecated. Icons are now managed with the new Icons Manager under Basepress menu)<br \/>\n<del>This contains the icon classes<\/del><\/li>\n<\/ul>\n<\/li>\n<li><del><b>icons <\/b>folder<\/del> (deprecated as above)<br \/>\n<del>This contains the icons fonts and a xml file listing the icons and where they will be used. More about icons later on.<\/del><\/li>\n<li><b>template-parts\u00a0<\/b>folder. This folder contains the templates for the various pages content.\n<ul>\n<li><b>post-content.php<\/b><br \/>\nThis file renders the post content.<\/li>\n<li><b>sections-content.php<\/b><br \/>\nThis file generates the content of a multi sections page. It should list all sections with their articles.<\/li>\n<li><b>sections-content-boxed.php<\/b><br \/>\nThis file generates the content of a multi sections page in boxed style. It shouldn&#8217;t show the list of articles.<\/li>\n<li><b>single-section-content.php<\/b><br \/>\nThis file generates the content of a single section page. It should list all articles of the current section.<\/li>\n<li><b>table-of-content.php<\/b><br \/>\nThis files renders the table of content in the articles body.<\/li>\n<li><b>adjacent-articles.php<\/b><br \/>\nThese files render the next and previous articles navigation.<\/li>\n<\/ul>\n<\/li>\n<li><b>products.php<\/b><br \/>\n(BasePress was originally created as a Multi Product KB so this file remains called products.php for backward compatibility)<br \/>\nThis template is responsible for generating the Knowledge base entry page and is called by the &#8216;basepress&#8217; shortcode. It should render at least the Knowledge Bases grid.<br \/>\nFurther content can be place in this file or directly in the Knowledge base page that contains the shortcode.<\/li>\n<li><b>sections.php<\/b><br \/>\nThis 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 &#8216;sections-content.php&#8217; file.<\/li>\n<li><b>sections-boxed.php<\/b><br \/>\nThis 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 &#8216;sections-content-boxed.php&#8217; file.<\/li>\n<li><b>single-section.php<\/b><br \/>\nThis 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 &#8216;single-section-content.php&#8217; file.<\/li>\n<li><b>full-width.php<\/b><br \/>\nThis 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.<\/li>\n<li><b>two-columns-left.php<\/b><br \/>\nThis template renders the post with a left sidebar. This template is optional.<\/li>\n<li><b>two-columns-right.php<\/b><br \/>\nThis template renders the post with a right sidebar. This template is optional.<\/li>\n<li><b>search.php<\/b><br \/>\nThis 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.<\/li>\n<li><b>global-search.php<\/b><br \/>\nThis is similar to the search template but used for global searches: searches that include all Knowledge Bases.<\/li>\n<li><b>comments.php<\/b><br \/>\nThis is the template for the article&#8217;s comments.<\/li>\n<li><b>restricted.php<\/b><br \/>\nThis is the template that renders an article with the restricted content notice. It is called every time someone as reached a restricted article.<\/li>\n<li><strong>functions.php<br \/>\n<\/strong>Use this file to run any custom code just like the function.php file found in any WordPress theme.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>BasePress knowledge base themes are easy to create as they don&#8217;t differ much from WordPress themes. 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 [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/basepresskb.com\/docs\/knowledge-base\/basepress-themes\/theme-files\/\">Read More&#8230;<span class=\"screen-reader-text\"> from Theme files<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","template":"","knowledgebase_cat":[20],"knowledgebase_tag":[],"class_list":["post-404","knowledgebase","type-knowledgebase","status-publish","hentry","knowledgebase_cat-basepress-themes"],"_links":{"self":[{"href":"https:\/\/basepresskb.com\/docs\/wp-json\/wp\/v2\/knowledgebase\/404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/basepresskb.com\/docs\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/basepresskb.com\/docs\/wp-json\/wp\/v2\/types\/knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/basepresskb.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/basepresskb.com\/docs\/wp-json\/wp\/v2\/comments?post=404"}],"version-history":[{"count":2,"href":"https:\/\/basepresskb.com\/docs\/wp-json\/wp\/v2\/knowledgebase\/404\/revisions"}],"predecessor-version":[{"id":1439,"href":"https:\/\/basepresskb.com\/docs\/wp-json\/wp\/v2\/knowledgebase\/404\/revisions\/1439"}],"wp:attachment":[{"href":"https:\/\/basepresskb.com\/docs\/wp-json\/wp\/v2\/media?parent=404"}],"wp:term":[{"taxonomy":"knowledgebase_cat","embeddable":true,"href":"https:\/\/basepresskb.com\/docs\/wp-json\/wp\/v2\/knowledgebase_cat?post=404"},{"taxonomy":"knowledgebase_tag","embeddable":true,"href":"https:\/\/basepresskb.com\/docs\/wp-json\/wp\/v2\/knowledgebase_tag?post=404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}