
-
AuthorPosts
-
April 5, 2025 at 11:33 pm #1480852
on an older post there is no working solution for it.
https://kriesi.at/support/topic/change-color-body-style-on-one-page/
If I look at the differences in the DOM, I notice that it essentially depends on the html classes: html_stretched, html_boxed and html_av-framed-box. These classes are set in the header.php according to the settings of the Enfold options. ( html_stretched, html_boxed and html_av-framed-box ) on body they are set without html_ )
There are some filters – but nothing could bring the solution. (see old topic).A child theme header.php, on the other hand, is quickly created because a file of that name in the child theme root directory is automatically used instead of the parent theme file.
If you only want to use the framed layout for a specific page, it is easier to use the reverse method – set the framed layout setting globally and change it to boxed or stretched for all other pages.
Long story short. Upload to your child-theme route directory a header.php copy and edit it.
search for that line ( around line 26) :$style = $avia_config['box_class'];
if you set the stretched layout – and want to have for a specifc page a boxed layout –
or you have set the boxed layout and want only one page to be in stretched layout – replace it by:if (is_page(array(27))) { $style = 'boxed'; // or 'stretched' } else { $style = $avia_config['box_class']; }
now – as mentioned above it is not easy to get for only some pages a framed layout. So here we go the other way :
Set on Enfold options page a framed layout as global setting – and change the layout to all others that are not that page:if (!is_page(array(27))) { $style = 'stretched'; } else { $style = $avia_config['box_class']; }
now every page now is stretched except the page 27
see here example page : https://clean.webers-testseite.de/impressum/ this page is framed – all others are stretched.
April 6, 2025 at 1:33 pm #1480871Hey Guenter,
Thank you for sharing Guenni007, this will probably help others. We will leave this thread open, if you want, should future users have questions.Best regards,
MikeApril 6, 2025 at 5:21 pm #1480878if you know a different child-theme solution – that would be a good contribution.
April 6, 2025 at 6:24 pm #1480882Hi,
Unfortunately not, and I don’t suggest adding the header.php or footer.php to a child theme without updating them after each update, this is the top reason for errors after updates.
Perhaps a request for this feature to the Dev Team: Github Feature Request would be best.Best regards,
MikeApril 7, 2025 at 12:29 am #1480898I don’t think it’s such a common feature. That’s why I don’t think it’s necessary to include something here. There is this solution above, and whoever can install something like this will also remember to check for significant changes in the header during updates.
April 7, 2025 at 12:42 am #1480899Hi,
I believe that you are correct, thank you for adding this solution and all of your great help!
Shall we leave this thread open for future questions?Best regards,
MikeApril 7, 2025 at 7:15 am #1480909Not for me – I just opened a new thread because the old one was closed.
April 7, 2025 at 7:31 am #1480912Hi,
You can also try this hook:
add_action( 'template_redirect', function() { global $avia_config; if ( is_admin() ) { return; } if ( is_page(27) ) { $avia_config['box_class'] = 'boxed'; } else { $avia_config['box_class'] = 'stretched'; } });
Best regards,
IsmaelApril 7, 2025 at 8:58 am #1480920Thanks Ismael – that worked – except for av-framed-box
maybe the other way roundEdit: that worked – setting to framed layout on enfold options (General Layout) – and change for all otheres to stretched ( or boxed ) layout.
add_action( 'template_redirect', function() { global $avia_config; if ( is_admin() ) { return; } if ( !is_page(2466) ) { $avia_config['box_class'] = 'stretched'; } });
many thanks again – that is as usual via child-theme functions.php the best solution.
See page 2466 : https://webers-testseite.de/impressum/-
This reply was modified 1 week, 3 days ago by
Guenni007.
-
This reply was modified 1 week, 3 days ago by
-
AuthorPosts
- You must be logged in to reply to this topic.