I would like to mark some sections in Advanced Layout Builder to show them only on desktop version of the web site, but not mobile one . I use for this. It works when I insert shortcode [notphone] and [/notphone] in the same text element in the Advance Layout Builder, however it doesn’t work when opening and closing tags in different sections, for example when I try to hide a row of videos or images. Could you please help me to solve this problem, are there other options to change what sections are displayed on mobile devices?
Hi martinbose!
You can add a unique selector for each Avia Elements. Edit functions.php, find this code:
if(isset($avia_config['use_child_theme_functions_only'])) return;
Below, add this code:
add_theme_support('avia_template_builder_custom_css');
Edit the Color Sections then add a unique custom css like “hide-section”. You can use media query to hide all sections with the “hide-section” selector. Add something like this on Quick CSS or custom.css:
@media only screen and (max-width: 767px) {
.hide-section {
display: none;
}
}
Best regards,
Ismael
Thank you, Ismail.
I have one more question, can I somehow limit the color section to the width of the main area. Because right now, on the devices where it supposed to be visable it takes the full width and have a default background color of black.
Regards,
Martin
Hey!
With the same selector you could try limiting its width by adding a margin on each side of it with something like:
.sectionname {
margin: 0 20%;
}
Regards,
Devin