{"id":19805,"date":"2026-11-16T14:34:13","date_gmt":"2026-11-16T08:34:13","guid":{"rendered":"https:\/\/betterdocs.co\/?post_type=docs&#038;p=19805"},"modified":"2026-11-16T14:43:21","modified_gmt":"2026-11-16T08:43:21","password":"","slug":"how-to-enable-lazy-load-sidebar-docs-subcategories-in-betterdocs","status":"publish","type":"docs","link":"https:\/\/betterdocs.co\/fr\/docs\/how-to-enable-lazy-load-sidebar-docs-subcategories-in-betterdocs\/","title":{"rendered":"How to Enable Lazy Load Sidebar Docs &#038; Subcategories in BetterDocs?"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Avec <a href=\"https:\/\/betterdocs.co\/fr\/\"><strong>BetterDocs<\/strong><\/a>, you can speed up a large knowledge base by enabling <strong>Lazy Load Sidebar Docs &amp; Subcategories<\/strong>. Once it is turned on, the documentation sidebar loads the docs of the active category only. The docs and subcategories of every other category are fetched when a visitor expands that category.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Follow this step-by-step guideline below to find out how to enable <strong>Lazy Load Sidebar Docs &amp; Subcategories<\/strong> dans BetterDocs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Remarque:<\/strong> This feature is available in BetterDocs <strong>4.8.0<\/strong> and later versions. It is turned off by default, so make sure you have <a href=\"https:\/\/betterdocs.co\/fr\/docs\/activate-betterdocs\/\"><strong>installed &amp; activated BetterDocs<\/strong><\/a> and updated it to the latest version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Does Lazy Load Sidebar Docs &amp; Subcategories Work?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By default, the documentation sidebar loads every category together with all of its docs and subcategories, even the ones that are collapsed. On a knowledge base with hundreds of categories, this makes the page heavy and slow to open.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you enable <strong>Lazy Load Sidebar Docs &amp; Subcategories<\/strong>, the sidebar works as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The category of the doc your visitor is reading loads with the page as usual, so the active doc stays highlighted.<\/li>\n\n\n\n<li>Every other category shows its title only, without loading the docs inside it.<\/li>\n\n\n\n<li>When a visitor clicks on a category, a short loading placeholder appears and the docs and subcategories of that category are loaded right there.<\/li>\n\n\n\n<li>A category that has already been opened does not load again on the same page.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In our tests on a knowledge base with 640+ categories, the page size went down from <strong>3.74 MB<\/strong> to <strong>1.04 MB<\/strong> and the page response time went down from around <strong>6 seconds<\/strong> to <strong>0.7 seconds<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Enable Lazy Load Sidebar Docs &amp; Subcategories<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First, open your WordPress Dashboard and navigate to <strong>BetterDocs \u2192 Settings \u2192 Layout \u2192 Documentation Page<\/strong>. Under the \u2018<strong>General<\/strong>\u2019 section, you will find the \u2018<strong>Lazy Load Sidebar Docs &amp; Subcategories<\/strong>\u2019 option.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img title=\"How to Enable Lazy Load Sidebar Docs &#038; Subcategories in BetterDocs? 1\" decoding=\"async\" src=\"https:\/\/betterdocs.co\/wp-content\/uploads\/2026\/11\/lazy-load-sidebar-settings-panel.jpg\" alt=\"Lazy Load Sidebar Docs &amp; Subcategories option in BetterDocs Layout settings\" loading=\"eager\" fetchpriority=\"high\" width=\"1368\" height=\"704\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Toggle the option to enable it. Afterward, make sure to hit the \u2018<strong>Save<\/strong>\u2019 button to save your changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Remarque:<\/strong> This option works on the sidebar only. So, make sure that you have enabled \u2018<strong>Sidebar Category List<\/strong>\u2019 from <strong>BetterDocs \u2192 Settings \u2192 Layout \u2192 Single Doc \u2192 General<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Check the Sidebar on Your Documentation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now, open any doc of your knowledge base from the front end. You will see that only the category of the current doc is expanded in the sidebar, and the rest of the categories are collapsed.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img title=\"How to Enable Lazy Load Sidebar Docs &#038; Subcategories in BetterDocs? 2\" decoding=\"async\" src=\"https:\/\/betterdocs.co\/wp-content\/uploads\/2026\/11\/lazy-load-sidebar-live-active.jpg\" alt=\"Lazy Load Sidebar Docs in BetterDocs: only the active category is expanded\" loading=\"lazy\" width=\"1568\" height=\"671\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Next, click on any other category from the sidebar. A loading placeholder will appear for a moment while BetterDocs fetches the docs of that category.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img title=\"How to Enable Lazy Load Sidebar Docs &#038; Subcategories in BetterDocs? 3\" decoding=\"async\" src=\"https:\/\/betterdocs.co\/wp-content\/uploads\/2026\/11\/lazy-load-sidebar-live-loading.jpg\" alt=\"Lazy Load Sidebar Docs in BetterDocs: loading placeholder after clicking a category\" loading=\"lazy\" width=\"1568\" height=\"518\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once the loading is done, all the docs and subcategories of that category will be displayed in the sidebar. This is how the sidebar keeps your documentation pages lightweight without hiding any doc from your visitors.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img title=\"How to Enable Lazy Load Sidebar Docs &#038; Subcategories in BetterDocs? 4\" decoding=\"async\" src=\"https:\/\/betterdocs.co\/wp-content\/uploads\/2026\/11\/lazy-load-sidebar-live-loaded.jpg\" alt=\"Lazy Load Sidebar Docs in BetterDocs: docs and subcategories loaded in the sidebar\" loading=\"lazy\" width=\"1568\" height=\"671\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Enable Lazy Load in Elementor &amp; Gutenberg<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you have designed your documentation pages with Elementor or Gutenberg, you can control this feature for each sidebar separately.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In <strong>Elementor<\/strong>, click on the \u2018<strong>BetterDocs Sidebar<\/strong>\u2019 widget and go to the \u2018<strong>Content<\/strong>\u2019 tab. Under the \u2018<strong>Query<\/strong>\u2019 section, turn on the \u2018<strong>Lazy Load Docs &amp; Subcategories<\/strong>\u2019 option and update the page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In <strong>Gutenberg<\/strong>, click on the \u2018<strong>BetterDocs Sidebar<\/strong>\u2019 block and open the block settings. Under the \u2018<strong>Query<\/strong>\u2019 section, enable the \u2018<strong>Lazy Load Docs &amp; Subcategories<\/strong>\u2019 toggle and save the page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Remarque:<\/strong> The \u2018<strong>BetterDocs Category Grid<\/strong>\u2019 widget and block come with the same option. Enable it only when you are using the Category Grid as a sidebar. If your Category Grid is placed anywhere else, keep this option turned off.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Things to Keep in Mind<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Docs inside the collapsed categories are loaded on click. So, they are not a part of the page until a visitor expands that category.<\/li>\n\n\n\n<li>This option works on the sidebar only. Your built-in documentation homepage stays the same.<\/li>\n\n\n\n<li>If you do not see the change on the front end, clear the cache of your caching plugin and reload the page.<\/li>\n\n\n\n<li>To go back to the default behavior, simply toggle off the \u2018<strong>Lazy Load Sidebar Docs &amp; Subcategories<\/strong>\u2019 option and hit the \u2018<strong>Save<\/strong>\u2019 button.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This is how easily you can enable <strong>Lazy Load Sidebar Docs &amp; Subcategories<\/strong> in BetterDocs and make your large knowledge base load faster.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00catre coinc\u00e9? N&#039;h\u00e9sitez pas \u00e0 contacter notre <a href=\"https:\/\/wpdeveloper.com\/support\/\"><strong>dedicated support team<\/strong><\/a> et nous vous aiderons avec vos questions.<\/p>","protected":false},"excerpt":{"rendered":"<p>Learn how to enable Lazy Load Sidebar Docs &#038; Subcategories in BetterDocs to make the documentation sidebar of a large knowledge base load faster.<\/p>","protected":false},"author":20,"featured_media":0,"template":"","meta":{"_eb_attr":"","inline_featured_image":false,"_eb_data_table":"","_templately_pack_id":"","_templately_imported_at":"","_templately_source":"","_templately_import_session_id":"","_thinkrank_schema_form_data":"","_thinkrank_selected_schema_type":"","_thinkrank_additional_schemas":"","_thinkrank_canonical_url":"","_thinkrank_og_title":"","_thinkrank_og_description":"","_thinkrank_og_image":"","_thinkrank_twitter_title":"","_thinkrank_twitter_description":"","_thinkrank_twitter_image":"","_thinkrank_imported_from":"","_thinkrank_focus_keywords":[],"_thinkrank_focus_keyword":"","_thinkrank_robots_meta_enabled":0,"_thinkrank_robots_meta":"","_thinkrank_advanced_robots_meta":"","_thinkrank_exclude_from_search":0,"_thinkrank_exclude_from_archives":0,"_thinkrank_primary_category":0,"_xspeed_no_cache":false,"_xspeed_expiry_hours":0,"_xspeed_lcp_image":"","footnotes":""},"doc_category":[309],"doc_tag":[10,14,18,17,16],"knowledge_base":[282],"class_list":["post-19805","docs","type-docs","status-publish","hentry","doc_category-configurations","doc_tag-betterdocs","doc_tag-configuration","doc_tag-documentation","doc_tag-knowledge-base","doc_tag-wordpress","knowledge_base-wordpress"],"year_month":"2026-11","word_count":708,"total_views":"7","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"mahedi","author_nicename":"mahediar-com-bd","author_url":"https:\/\/betterdocs.co\/fr\/author\/mahediar-com-bd\/"},"doc_category_info":[{"term_name":"Configurations","term_url":"https:\/\/betterdocs.co\/fr\/docs\/shopify\/configurations\/"}],"doc_tag_info":[{"term_name":"betterdocs","term_url":"https:\/\/betterdocs.co\/fr\/docs-tag\/betterdocs\/"},{"term_name":"configuration","term_url":"https:\/\/betterdocs.co\/fr\/docs-tag\/configuration\/"},{"term_name":"documentation","term_url":"https:\/\/betterdocs.co\/fr\/docs-tag\/documentation\/"},{"term_name":"knowledge base","term_url":"https:\/\/betterdocs.co\/fr\/docs-tag\/knowledge-base\/"},{"term_name":"WordPress","term_url":"https:\/\/betterdocs.co\/fr\/docs-tag\/wordpress\/"}],"knowledge_base_info":[{"term_name":"WordPress","term_url":"https:\/\/betterdocs.co\/fr\/docs\/wordpress\/","term_slug":"wordpress"}],"knowledge_base_slug":["wordpress"],"_links":{"self":[{"href":"https:\/\/betterdocs.co\/fr\/wp-json\/wp\/v2\/docs\/19805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/betterdocs.co\/fr\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/betterdocs.co\/fr\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/betterdocs.co\/fr\/wp-json\/wp\/v2\/users\/20"}],"version-history":[{"count":7,"href":"https:\/\/betterdocs.co\/fr\/wp-json\/wp\/v2\/docs\/19805\/revisions"}],"predecessor-version":[{"id":19819,"href":"https:\/\/betterdocs.co\/fr\/wp-json\/wp\/v2\/docs\/19805\/revisions\/19819"}],"wp:attachment":[{"href":"https:\/\/betterdocs.co\/fr\/wp-json\/wp\/v2\/media?parent=19805"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/betterdocs.co\/fr\/wp-json\/wp\/v2\/doc_category?post=19805"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/betterdocs.co\/fr\/wp-json\/wp\/v2\/doc_tag?post=19805"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/betterdocs.co\/fr\/wp-json\/wp\/v2\/knowledge_base?post=19805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}