• Im trying to make the ‘Full-Width’ template the default. Without need to select it everytime. mainly to have additional pages like WooCommerce pages all using the ‘Full-Width’ template.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Don’t know of a way to set this up in WP and couldn’t find any plugins for it, but if you go into the Pages->All Pages screen, then click the checkbox to select all the pages, click on the Bulk Actions drop down and choose Edit.

    Then click on Apply. From there, you should have an option to modify all of the selected pages templates to the Full Width one. Doesn’t accomplish what you’re wanting specifically, but it may make updating a bunch of page templates quicker instead of doing it one by one.

    Anyone found a way doing it in the TwentyTwenty template ? Jarret’s reply does not make it default, so you have to do it manually for each new post or page.

    It is a nightmare if you have multiple contributors, not being able to force a consistent default template on them.

    • This reply was modified 4 years, 3 months ago by fwlehmann.

    You could create a child theme and make a new template (or modify the default) page to do so.

    @stilman-davis how would I go about it (Modifying the current theme). Using latest WP with Guttenberg, and TwentyTwenty theme.

    Do you know about Child Themes? Do you know much about CSS?

    You might be able to do something with Dashboard>Appearance>Customiser>Additional CSS.

    I cannot help you immediately, I can only give you anudge in a different direction.

    I do know CSS, and PHP as well. I was hoping for a quick and nasty solution, without going through the source and “reverse engineer” it.

    But I guess thats the way to go then. Thx

    here is the codex link to understand how it works with examples: body class

    I was looking for the same thing but for custom category template, in your case the code could be:
    (add this code to functions.php of a child theme) #i’m not expert just playing with code found in the codex#

    That code will add the class “template-full-width” to all pages

    add_filter( 'body_class', 'custom_class' );
    function custom_class( $classes ) {
        if ( is_page () ) {
            $classes[] = 'template-full-width';
        }
        return $classes;
    }

    There is also this CSS solution more simple:

    .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.is-style-wide) {
        max-width: 120rem;
        width: calc(100% - 4rem);
    }
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to make ‘Full-Width’ template default site wide?’ is closed to new replies.