Home Forums WoodMart support forum functions.php Reply To: functions.php

#339317

Bogdan Donovan
Keymaster

Hi,

Options like “Sidebar position” and “Sidebar size” affect only the site’s frontend. As was mentioned in the following replies (https://xtemos.com/forums/topic/functions-php/#post-337657, https://xtemos.com/forums/topic/functions-php/#post-338445):

Gutenberg didn’t allow us to detect the presence of sidebar on the site’s frontend of the current page/article and because of that, sidebar width can’t be subtracted from Gutenberg editor container width on the site’s backend. If Gutenberg allows us to do so, the following width changes will be applied.

As was mentioned in the following reply (https://xtemos.com/forums/topic/functions-php/page/2/#post-339028), if you want to overwrite editor container width, you can use custom code provided in this reply. Code need to be added to the child theme function.php file:

add_action('admin_head', 'wd_admin_fix');

function wd_admin_fix() {
  echo '<style>body div.block-editor .editor-styles-wrapper .wp-block:not([data-align="full"]) {
	max-width: 840px;
}</style>';
}

Also in the next update, we will add the ability to disable theme styles on Gutenberg editor window.

Kind Regards