Custom Theme - Override Max-Content-Width (1100px) via PHP / WordPress Filter

Hey Folks,
I am a developer and use Beaver Builder with a custom theme (based on Underscores). Is there any chance to override the default content max width (1100px) via WordPress Filter (or something similar) in functions.php

I searched all files within the plugin and I searched within a full database dump without any luck … Where is this value stored?

Any help would be appreciated!

Hi Neo,

Apparently the max-width is saved by the editor in the style property of the row content (.fl-row-content.fl-row-fixed-width). What do you want to do?

The general width can be set in the general BB settings.
You can override this for a particular row

If for some reason you want it to differ according to some condition in the wordpress backend, you could write a the_content filter in wordpress. You could even use PHP’s DOMDocument interface to make jquery-like changes to the content just before it shows.

This all depends on your purpose. So please explain!

Jelmer

Hi Jelmer,
thanks for your reply. I know that I can override / manipulate the DOM, but this should be only the last (dirty) option. If I add a new row it looks like this …

The default setting for “with” is fixed and “Fixed Width” is 1100. Where is this number stored and how could I change it?

I use a custom theme, so there are no options via Customizer available. I thought this value was stored as theme mod > ‘fl-content-width’ …

set_theme_mod('fl-content-width','1400');
echo get_theme_mod('fl-content-width',''); // 1400

but even if I change this value, nothing changes and BB stills uses 1100 as default.

Best Daniel

It’s in the BB Global settings (ctrl+U when editing a page in BB). I’m not sure that will change the rows that are already there. But maybe this is all you were looking for?

Jelmer

1 Like

Thats’s absolutely right! WOW - THANK YOU - I really missed this section.
FYI: Yes, it changed all existing rows as well, but this not a problem, because I am still in developing …
Have a great day and thanks for your help!