Skip to content

Theme Settings Metabox

The Total theme includes a powerful custom built (for Total only) metabox that allows you to tweak multiple aspects of the current page/post. This includes, but isn’t limited to, disabling page elements like the footer, callout, top bar…etc, adding a slider to the top of the page, changing the page background and altering the footer callout content and button. Below are some screenshots showing how you can locate the settings metabox as well as some important information you’ll want to check out.

Locate settings when using Gutenberg

Locate Settings when using Classic Editor or Page Builder

Important – Using The Options on Many Posts/Pages

While you can use these settings for multiple posts/pages it’s usually recommended not doing this because if you ever want to update all the posts/pages where you manually changed things it could be a hassle. That’s why for many of these settings you will find options in the “Customizer“. Additionally ANY of these settings can be changed using a filter via your child theme. If you aren’t sure how have a look at the snippets to see if you can locate an example or ask and we can help write some custom code for your specific needs.

For example if you wanted to set a custom background or title for all the items in a Custom Post Type then you can use code for that via your child theme to do it automatically without manually changing the settings using the metabox.

The purpose of the Metabox is for making exclusive changes to a specific page or if you only have a few posts/pages you wanted to alter.

Adding/Removing The Page Settings From Post Types

As a developer you may want to have access to the same page settings for your custom post types, luckily Total has been coded with this in mind, that means all the custom fields available for the metabox can be used for any post type and all you have to do is add a little function to your child theme if you want the actual metabox to be visible on the post type editor screen. And the built-in filter will also allow you to quickly remove the metabox from any post type you don’t want it on.

// Sample function showing how to tweak the metaboxes display for post types
add_filter( 'wpex_main_metaboxes_post_types', function( $types ) {

  // Add to my custom-type post type
  $types[] = 'custom-type';

  // Remove from blog posts
  unset( $types['post'] );

  // Return post types array
  return $types;
}, 40 );

Note: If you use our Post Types Unlimited Plugin to add your custom post types you will find an option to enable/disable this whenever you create or edit a post type.

Default post types

The metabox is enabled by default on the following post types:  post, page, portfolio, staff, testimonials, page, product, tribe_events.

Adding New Fields/Tabs To The Metabox?

Yes, this is possible! Have a look at the example snippet here.

Back To Top