Theme Options: Add or Remove a Tab

Function Reference: themeblvd_add_option_tab

This function will add an options tab to the theme options page.

If you’re setting a new tab on the theme options page, this is just your starting point. From there, you’ll then continue to add your section(s) of options to it.

Usage
themeblvd_add_option_tab( $tab_id, $tab_name, $top );
Parameters
$tab_id
(string) (required) The ID of the tab to be added.
Default: None
$tab_name
(string) (required) The name of the tab to be added.
Default: None
$top
(boolean) (required) Whether the new option tab should be added as the first tab. By default, this will be false and so the new tab will appear as the last tab.
Default: false
Examples

In this example, we’ll add a tab onto the theme options page called, “Social Media.” See the article, Putting it all together, for this example expanded further.

themeblvd_add_option_tab( 'social_media', 'Social Media' );

Function Reference: themeblvd_remove_option_tab

This function allows you to completely remove a tab, and its options, from the theme options page.

Usage
themeblvd_remove_option_tab( $tab_id );
Parameters
$tab_id
(string) (required) The ID of the tab to be removed.
Default: None
Examples

Let’s say you’ve torn the theme apart, and through action and filters, you’ve create a custom header and footer, set the sidebar layout, and disabled breadcrumbs, sticky header, scroll-to-top button from the global config. — Well, now there’s really no need for the Layout tab at all on the theme options page. So, just remove the whole thing, by simply doing the following.

themeblvd_remove_option_tab('layout');