Site logo

Archived topic

Generateblocks breakpoints

1 reply · Started by Rostyslav on March 18, 2021

Viewing posts 1–2 of 2

Hello,

How can I change the generateblocks breakpoints for these ones:?

@media (max-width: 768px)
@media (min-width: 769px) and (max-width: 1024px)
@media (min-width: 1025px)

I tried this code with Code Snippets Plugin and it doesn´t work.

add_action( 'wp', function() {
    add_filter( 'generateblocks_media_query', function( $query ) {
        $query['desktop'] = '(min-width: 1025px)';
        $query['tablet'] = '(max-width: 1024px)';
        $query['tablet_only'] = '(max-width: 1024px) and (min-width: 769px)';
        $query['mobile'] = '(max-width: 768px)';

        return $query;
    } );
}, 20 );

Thank you!

This archived topic is closed to new replies.