Astra: Change the Mobile Menu Breakpoint
Changes the screen width at which the Astra theme switches to the mobile (hamburger) menu, useful when a long menu wraps on tablets.
Opens WPIDE on
Code
// Switch to the mobile menu below this width (px).
$wpide_astra_breakpoint = 1100;
add_filter( 'astra_header_break_point', function () use ( $wpide_astra_breakpoint ) {
return absint( $wpide_astra_breakpoint );
} );
Notes
Width in pixels; Astra's default is 921. Clear any CSS cache after changing it.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.