My organization’s logo is not showing in the Divi Theme. How can I fix this?

Author: mark 38 views

The Divi theme tries to influence the logo used in your site and is therefore trying to do the same thing as the Organization Toolkit. Themes always tend to win over plugins in circumstances like this, but there are a few changes that can be made to make sure your theme shows the organisation logo.

To make this work, you will need to have a Divi child theme in place. If you don’t already have one of these please visit this page for more information about child themes.

Once you have a child theme in place, please complete the following steps:

1. Copy the file header.php from the main folder of the Divi theme into the main folder of your child theme.

2. Edit the file you have copied over and after the line that looks like:

				
					$logo = ( $user_logo = et_get_option( 'divi_logo' ) ) && ! empty( $user_logo )
					? $user_logo
					: $template_directory_uri . '/images/logo.png';

				
			

and before the line that looks like:

				
					$logo_size   = et_get_attachment_size_by_url( $logo );

				
			

You can add the following code, which calls a function from the Organization Toolkit and overrides the Divi defined logo if necessary:

				
					if (class_exists('B2BDash_Public')) {

                $b2bdash = new B2BDash_Public(1, 1);
                if (!empty($b2bdash->b2bdash_custom_logo())) {

                    $logo = wp_get_attachment_url($b2bdash->b2bdash_custom_logo());

                }

            }