Site logo

Archived topic

Volume template spacing problem

5 replies · Started by Alessandro on June 8, 2021

Viewing posts 1–6 of 6

Hi,
i have use the "Volume" theme, but in the article is not possible to change the background color, and have a problem with header height (have use a logo image).

Another request: Is it possible to change the color logo and header background color only in home page?
Thank you

Hi there,

go to Dashboard > Appearance > Elements and edit the Single Post Hero block element.
Select the parent Container Block and increase the Top Padding to make space for your larger logo.

For the home page is it a different logo you want to add ? Or do you want to change the layout as well ?

Hi David,
for the logo of the home page i need to invert the logo color (with logo img) and change the background color header.

Hi Alessandro,

Hi David,
for the logo of the home page i need to invert the logo color (with logo img) and change the background color header.

You can try this CSS:

body.home img.header-image.is-logo-image.lazyloaded {
    filter: invert(1);
}

This literally inverts the color of the image. Although I'm not sure this is your desired result.

If you wish to change the image to something else on different pages, you can filter that using this filter.
https://docs.generatepress.com/article/generate_logo_output/

Example: changing the logo to Google on home page.

add_filter( 'generate_logo_output','logo_switch', 10, 2 ); 
function logo_switch( $output, $logo ) {
$logo_swap = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png';
if(is_front_page()){
	printf(
		'<div class="site-logo">
			<a href="%1$s" title="%2$s" rel="home">
				<img width="250" height="198" class="header-image" src="%3$s" alt="%2$s" title="%2$s" />
			</a>
		</div>',
		esc_url( apply_filters( 'generate_logo_href' , home_url( '/' ) ) ),
		esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ),
		$logo_swap
	);
}
}

thankyou!

No problem. :)

This archived topic is closed to new replies.