{"id":11750,"date":"2024-04-08T10:12:06","date_gmt":"2024-04-08T04:12:06","guid":{"rendered":"https:\/\/helpdesk.spider-themes.net\/docs\/eazydocs-wordpress-plugin\/settings\/how-to-enable-doc-assistant\/how-to-add-your-own-tab\/"},"modified":"2026-01-23T12:06:16","modified_gmt":"2026-01-23T12:06:16","slug":"how-to-add-custom-tab-in-assistant","status":"publish","type":"docs","link":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/docs\/eazydocs-wordpress-plugin\/developer-docs\/how-to-add-custom-tab-in-assistant\/","title":{"rendered":"How to add custom tab in Assistant"},"content":{"rendered":"\n<p>The <strong>EazyDocs Assistant<\/strong> allows users to add their custom tabs and content easily. Here I have explained how to to use the hook and display a custom tab into the EazyDocs Assistant.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hook Details<\/h2>\n\n\n\n<div class=\"wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:80%\">\n<ul class=\"wp-block-list\">\n<li><strong>Hook Name:<\/strong> <code>eazydocs_assistant_tab<\/code><\/li>\n\n\n\n<li><strong>Parameters:<\/strong> None<\/li>\n\n\n\n<li><strong>Return Type:<\/strong> Array &#8211; An array containing all custom tabs and their corresponding content.<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\"><div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e814e761b81&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69e814e761b81\" class=\"alignright size-thumbnail wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-content\/uploads\/2024\/04\/image-79-150x150.png\" alt=\"\" class=\"wp-image-11770\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">How to Use: add custom tab <\/h2>\n\n\n\n<p><strong>Adding Custom Tabs:<\/strong>To add custom tabs and content, users can utilize the <code>add_action<\/code> function with the <code>eazydocs_assistant_tab<\/code> hook. This hook expects a callback function that adds custom tabs and their respective content to the returned array<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">add_action( 'eazydocs_assistant_tab', 'my_custom_tab' );<br>function my_custom_tab( $tabs = [] ){   <br>    $tabs[] = array(<br>        'id' =&gt; 'my-tab',<br>        'heading' =&gt; 'Custom Tab',<br>        'content' =&gt; 'This is custom content' \/\/ Or any callback function<br>    );<br>    return $tabs;<br>}, 10);<\/pre>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\"><div class=\"wp-block-image is-style-default\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69e814e7624fa&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69e814e7624fa\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-content\/uploads\/2024\/04\/image-77.png\" alt=\"\" class=\"wp-image-11763\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Structure of Custom Tab Array:<\/strong><\/li>\n\n\n\n<li>Each custom tab is represented by an associative array with the following keys:\n<ul class=\"wp-block-list\">\n<li><code>id<\/code>: A unique identifier for the tab.<\/li>\n\n\n\n<li><code>heading<\/code>: The title or heading of the tab.<\/li>\n\n\n\n<li><code>content<\/code>: The content to be displayed within the tab. Users can use static content or callback functions to display their content dynamically for the specified tab of the EazyDocs Assistant.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Adding Additional Tabs:<\/strong> Users can add as many custom tabs as needed by appending more arrays to the <code>$tabs<\/code> array within the callback function.<\/li>\n\n\n\n<li><strong>Displaying Custom Tabs:<\/strong> Once custom tabs have been added using the <code>eazydocs_assistant_tab <\/code>hook, they will be automatically displayed within the EazyDocs Assistant.<\/li>\n<\/ol>\n\n\n\n<p><br><br>Enhance your EazyDocs Assistant by adding custom tabs effortlessly using the <code>eazydocs_assistant_tab<\/code> hook. With this feature, you can personalize the assistant&#8217;s interface to include unique tabs and content tailored to your needs. To explore more powerful customization options, visit our <a href=\"https:\/\/arolax.crowdytheme-demo.com\/documentation\/docs\/eazydocs-wordpress-plugin\/developer-docs\/\">Developer Docs for EazyDocs<\/a> page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>EazyDocs Assistant empowers you to easily add custom tabs and content. Use the eazydocs_assistant_tab hook with add_action to personalize tabs. Simply return an array containing tab details, and your unique content will appear seamlessly in the assistant\u2019s interface.<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":5521,"menu_order":40,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-11750","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/docs\/11750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/comments?post=11750"}],"version-history":[{"count":1,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/docs\/11750\/revisions"}],"predecessor-version":[{"id":18141,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/docs\/11750\/revisions\/18141"}],"up":[{"embeddable":true,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/docs\/5521"}],"wp:attachment":[{"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/media?parent=11750"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/arolax.crowdytheme-demo.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=11750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}