• following this page I can set the content width for a template but is there a universal place to set it once?

    https://gutenberghub.com/how-to-use-the-layout-settings-for-blocks-in-the-wordpress-block-editor/

    Even when I’m editing the page template I have to set the width for the title and the content separately.

    And then I have to do it again for the post and then again for the four oh four etc.

    I thot the content with was supposed to be overall for the whole site .

    Even setting the above, my site doesn’t show those widths.

    Instead I see in the CSS


    1. –wp–style–global–content-size: 650px;
    2. –wp–style–global–wide-size: 1200px;

    Where do these settings come from?

    • This topic was modified 1 year, 6 months ago by mayy3321.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    The dimensions are initially from your theme’s theme.json file (settings.layout). They can be overridden in the style book. They are normally applied to any page’s content area, but often individual pages or elements can have their own override dimensions specified. If you do not specify an override, the default values from either theme.json or the style book should be inherited by the elements.

    Individual themes can deviate from expected behavior. If you’re not getting the behavior I’ve described, I suggest asking for guidance through your theme’s dedicated support channel.

    Thread Starter mayy3321

    (@mayy3321)

    Thanks I’m hoping to use 2023 theme. To stay as clean as possible.

    I’m wondering About how you would recommend I do this so that I can update to 2024, etc as they come out, but so I don’t Have to copy all the settings from the style editor.

    Moderator bcworkz

    (@bcworkz)

    Styles are more or less unique to each theme. If you switched to another theme you’d need to re-apply any desired custom styling. Default themes are maintained for quite a while after its initial introduction. You can continue to use 2023 for a long time even when there will then be 2024, 2025, 2026…etc. I have a site that still uses 2011 ??

    While content width is somewhat universal, other custom styling may not be applicable in a different theme. Carrying over styles to a new theme is generally not seen as desirable. A new theme is an opportunity to give your site a fresh new look, not to retain old styling from early on.

    For most people, using the style book to define custom styling is adequate. If your custom styling is quite extensive you might want to consider creating a child theme. Child themes are still tied to a particular parent theme. While it’s simple to change the parent theme of your child, this does not mean you existing child styles will still be applicable.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘correct place to set content width in block theme’ is closed to new replies.