Resolved

Deactivate Responsive Design for certain pages

Ultra Theme started by Madera Jun 3, 2015 19 replies
Madera Jun 3, 2015 · 7:57 pm #1674

Hello,

First, let me thank you for that wonderful theme, its working very well.
I am using the SiteOrigin Page Builder and deactivated the “responsive design” in their settings, which allows me to put several pictures horizontally next to each other using rows on mobile devices.
If I would activate responsive design, those pictures would be listed vertically with only one in a row.

However, for some pages with text, I would prefer the vertical design. I checked on the SiteOrigin website and they recommend to use this code in the functions.php file to deactivate “responsive design” on only certain pages:

function ultra_child_per_page_responsive($val) {
	$non_responsive_pages = array(
		105, 107
	);

	global $post;
	if( is_singular() && !empty($post) && in_array( $post->ID, $non_responsive_pages ) ) {
		$val = true;
	}
    $responsivebool = true;
	return $val;
}
add_filter('siteorigin_setting_layout_responsive', 'ultra_child_per_page_responsive');

105 and 107 are page IDs.

This is working, but it is not having the same effect, as it would be if i deactivated the “responsive layout” checkbox in the settings menu. Instead, the responsive menu is disappering as well.
Do you know any way to achieve a responsive layout only for the content of certain pages, but keeping the menus responsive on mobiles throughout?

Thanks

Madera

Andrew Misplon Puro Apr 19, 2017 · 7:25 pm #6326

Hi, is Settings > Page Builder > Layout > Responsive Layout enabled? and is Use Legacy Layout Engine set to Detect older browsers?

Andrew Misplon Puro Apr 19, 2017 · 7:30 pm #6327

If the settings are normal then it might be worth temporarily deactivating all plugins not authored by SiteOrigin and see if that changes anything.

Madera Apr 19, 2017 · 7:31 pm #6328

Thank you so much, that was it! I still had Responsive Layout disabled. When I turn “collapse behavior” to “standard” now, i get what i wanted.

Andrew Misplon Puro Apr 19, 2017 · 7:32 pm #6329

Awesome 🙂 Glad that helped.

20 posts