skip to Main Content

Only Show Staff Settings in the Theme Settings Metabox

By default the Total theme displays a "Theme Settings" metabox on all core public post types which includes various settings to modify the post on independently. This meta box can be disabled completely via the Theme Panel but it can also be modified via custom code. This snippet shows how you can modify the Theme Settings so when editing a staff post it will only display the staff settings and not all the other general settings.

 * Modify the Theme Settings metabox to display only the Staff settings when editing a staff post.
 * @link
add_filter( 'wpex_metabox_array', function( $settings, $post ) {
    if ( 'staff' === get_post_type( $post ) && isset( $settings['staff'] ) {
        $settings = [
    return $settings;
}, 10, 2 );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)
Back To Top