generate_mobile_menu_media_query

generate_mobile_menu_media_query

Starting in GeneratePress 2.3, the generate_mobile_menu_media_query allows us to change when the mobile menu is initiated.

Default: 768px

To change the breakpoint to 1000px, we can use the follow PHP snippet:

add_filter( 'generate_mobile_menu_media_query', function() {
return '(max-width: 1000px)';
} );

If you change the media query with the above filter, you should also set the not mobile media query filter. This should be your breakpoint value + 1.

add_filter( 'generate_not_mobile_menu_media_query', function() {
return '(min-width: 1001px)';
} );

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注