• Hello,

    I have answered to a topic regarding the option to use a different logo for the cover template in twenty twenty theme, but maybe it is best to create one here.

    For some reason the ‘extra options for twenty twenty’ plugin, conflicts with the woocommerce plugin. So I thought I’d use the code you give in the thread I mentioned above, to change the logo image source for the cover template page. But something else happens: I see the logo that I see on every page. But when I check elements in my browser I see that the img src has actually changed (that is the right file), the srcset hasn’t.

    I have no idea why, but on my testsite there is no conflict between woocommerce and ‘extra options for twenty twenty’. Everything should be the same over there. It’s the site where I created everything, and then migrated it to the desired domain. Then I installed woocommerce, and that’s when a conflict arose. I installed it on my testite (woocommerce) > everything is fine.

    So maybe:
    – I should know how to completey remove all traces of the plugin, before reinstalling it?
    – Or I forget about the plugin and try to replace the logo on cover with the right code?

    Thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter renate1975

    (@renate1975)

    Hello there,

    I have tried to add code to function.php in my childtheme. Including srcset, but it didn’t work and I deleted it again. Now: there is no logo on my cover template. Completely gone. But I have gone back to the original situation, so I don’t get it.

    Just an update of the complete mess I am in.

    Thread Starter renate1975

    (@renate1975)

    It’s been sorted! I have added srcset, to the code you gave in another thread, succesfully.

    add_filter( 'twentytwenty_site_logo', function( $html, $args, $classname, $contents ) {
    	if ( is_page_template( 'templates/template-cover.php' ) && has_custom_logo() ) {
    		$logo      = get_custom_logo();
    		$logo      = preg_replace( '@src="([^"]+)"@', 'src="https://www.placeholder.nl/wp-content/uploads/2020/04/cropped-logo-2.png", srcset="https://www.placeholder.nl/wp-content/uploads/2020/04/cropped-logo-2.png 616w, https://www.placeholder.nl/wp-content/uploads/2020/04/cropped-logo-2-300x225.png 300w" sizes="(max-width: 616px) 100vw, 616px" width="616" height="462"', $logo );				
    		$contents  = sprintf( $args['logo'], $logo, esc_html( get_bloginfo( 'name' ) ) );
    		$wrap      = $args['condition'] ? 'home_wrap' : 'single_wrap';
    		
    		return sprintf( $args[ $wrap ], $classname, $contents );
    		
    	}
    	
    	return $html;
    }, 10, 4 );
    • This reply was modified 4 years, 10 months ago by renate1975.
    • This reply was modified 4 years, 10 months ago by renate1975.
    • This reply was modified 4 years, 10 months ago by renate1975.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin conflict with woocommerce’ is closed to new replies.