Skip to content

Page/Post Content Layouts

Total includes 4 different layouts for your pages, posts and/or archives. Below is an explanation of each layout option and a guide for changing your layout globally, on a per page basis or via the theme hook.

Layout Options

  1. Right Sidebar
  2. Left Sidebar
  3. No Sidebar
  4. Full-Screen (content touches the side of the screen)

Changing Layouts Globally

Total includes options to alter your layout globally for the various sections of your site. Simply go to Appearance > Customize browse to the appropriate tab and locate the “Layout” setting to modify the layout.

Default Site Layout

When you first activate the Total theme all your pages and posts will have the Right Sidebar layout by default but you can change this value in the Customizer under the Layout > General tab. The default layout is used as the fallback if a specific layout hasn’t been set for a given page, post or archive.

Altering Specific Layouts

Perhaps you want your default layout to be the “No Sidebar” layout so none of your pages have a sidebar but you want to add a sidebar to your blog posts. Simply browse to the correct Customizer tab to locate the settings to change.

Controlling the Layout for Custom Post Types

If you are using our Post Types Unlimited plugin you can easily control the layout of your post type via the theme’s added settings:

If you are using custom code or a different plugin for registering your custom post type you will need to use code to modify the layout, see the following section.

Changing the Layout on a Specific Post or Page

If you want to alter the layout of any page or post you can also do so by selecting the appropriate page template (you can also use the Theme Settings Metabox but using a page template is recommended).

Below is a screnshot showing where to change the page layout when using the classic editor.

Here is a screenshot showing how to change your layout using the Gutenberg editor.

Changing the Layout Using Hooks

For more advanced edits you can use the theme filter “wpex_post_layout_class” to alter the page layout anywhere on the site, this will work for posts, pages, archives, custom post types…etc. Have a look at an example below:

add_filter( 'wpex_post_layout_class', function( $class ) {
    if ( is_front_page() ) {
        $class = 'full-width';
    }
    return $class;
}, 20 );
Back To Top