• Resolved Rostyslav

    (@rostyk1000)


    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!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tom

    (@edge22)

    Hi there,

    That code will work, but you will need to regenerate your CSS files after your add it in GenerateBlocks > Settings.

    Thread Starter Rostyslav

    (@rostyk1000)

    I want to have the same breakpoints in generateblocks that generatepress has.

    What CSS should I add to have those breakpoints in my container in generateblocks?

    Thanks for answering!

    Plugin Author Tom

    (@edge22)

    What you shared should match the breakpoints with GeneratePress – have you given it a shot?

    Thread Starter Rostyslav

    (@rostyk1000)

    But, where should I paste that code? In generatepress child function.php?

    Plugin Support Leo

    (@leohsiang)

    Yup that should work ??

    Thread Starter Rostyslav

    (@rostyk1000)

    Works!

    Thank you!

    • This reply was modified 4 years ago by Rostyslav.
    Plugin Author Tom

    (@edge22)

    Glad we could help ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Generateblocks breakpoints’ is closed to new replies.