Archived topic
Moving container anywhere in block
6 replies · Started by Zachary on May 7, 2021
Hi there,
Am using one of the GP premium themes. I am having a problem with trying to move a container within a block. Maybe this feature isn't available. But, is there a way I can freely move a container within a block? For example I want to move a text box to an exact position within the container. I can move the container but it snaps to a predefined spot.
Thanks for the help!
Hi there,
no that would require absolute positioning of the Block - and thats not something the Gutenberg editor is good at doing.
Instead you would apply padding to a container or margins to a block to adjust its placement.
Thanks David, I also have one more problem. I am trying to add google font "Bebas Neue" to add to customizer list so I can change the typography of primary menu I am using this code:
add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
function tu_add_google_fonts( $fonts ) {
$fonts[ 'bebas neue' ] = array(
'name' => 'Bebas Neue',
'variants' => array( '400', '500', '700' ),
'category' => 'serif'
);
return $fonts;
}
But the font is not showing up still in dropdown.
Thanks David, I also have one more problem. I am trying to add google font “Bebas Neue” to add to customizer list so I can change the typography of primary menu I am using this code:
add_filter( ‘generate_typography_customize_list’, ‘tu_add_google_fonts’ );
function tu_add_google_fonts( $fonts ) {
$fonts[ ‘bebas neue’ ] = array(
‘name’ => ‘Bebas Neue’,
‘variants’ => array( ‘400’, ‘500’, ‘700’ ),
‘category’ => ‘serif’
);
return $fonts;
}
But the font is not showing up still in dropdown.
Where are you adding that code ?
Code Snippet?
It may be a simple case of the single quotes being the incorrect type.
Delete the current snippet and copy and paste the following into your snippet:
add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' );
function tu_add_google_fonts( $fonts ) {
$fonts[ 'bebas neue' ] = array(
'name' => 'Bebas Neue',
'variants' => array( '400', '500', '700' ),
'category' => 'serif'
);
return $fonts;
}
Make sure the quotes are straight ie. ' when pasted in.