-
Hello.
There is a gap between the image and the text, even though the margin is 0.
And part 2 also has a strange design.
Is it because I use the php code below to give a padding value of 20 at the bottom of the image? If so, can it not be applied on mobile?
add_filter( 'generateblocks_defaults', function( $defaults ) { $color_settings = wp_parse_args( get_option( 'generate_settings', array() ), generate_get_color_defaults() ); $defaults['image']['marginBottom'] = '20'; return $defaults; } );
-
Alvind
Hi there,
You can try updating the PHP snippet to this:
add_filter('generateblocks_defaults', function ( $defaults ) { if ( ! wp_is_mobile() ) { $defaults['image']['marginBottom'] = '20'; } return $defaults; });
The updated code should only be running on desktop.
-
Thank you so much!
-
Alvind
You’re welcome.
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.