Replace site name with logo and keep custom social following header code intact

I’ve found lots of suggestions for replacing the site name with a custom logo image, but am unsure how to make any of them work with the custom code I’ve inserted into the header.php file in my Wordpress dashboard. Between

</head>

<header id="masthead" class="site-header" role="banner">

I inserted code generated from FB, Twitter, and Google+ to create clickable “follow” buttons, and between

<?php echo is_home() ?  '<h1 class="site-name">' : '<p class="site-name">'; ?>

<a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>

I inserted the code that actually displays the buttons (see the attachment for my full “header.php” code).

The problem is that when I add an image via Sparkling’s super easy “header image” section, these follow buttons disappear.

Suggestions? Could I modify the header.php code further to directly link to my logo instead of displaying my site name?

Thanks!

whoops- attachment was scrubbed by security filters. Let me know if you need more information!

Hi @vschutte,

I hope you are well today and thank you for your question.

You can replace site name with logo by following the instructions provided on the below page in the section “4. Header Image (Logo Upload)”

Best Regards,
Movin

Unfortunately, this doesn’t answer my question. I’ll try to clarify:

I followed the instructions in section “4. Header Image (Logo Upload)" already and the logo replaces my site name perfectly. The problem is that I modified my header.php file to contain code that gives me Facebook, Twitter, and Google + follow buttons in my header, immediately to the right of my site name. When I replace my site name with my logo in the header (by following the instructions you linked me to), these follow buttons disappear. Is there a way to replace my site name with my logo in the header while retaining the follow buttons in the header?

I described the code modifications in my original quesiton but am prevented from uploading an attachment with my complete header.php code by the security on the colorlib site. If it would help to paste all my modified code here, I’m happy to do it.

Thanks for your quick reply!

Is there a way to replace my site name with my logo in the header while retaining the follow buttons in the header?

Could you please share me your modified header.php file by making it zip file so that i can troubleshoot it?

Let me know if this doesn’t work

Please try using the attached modified header file code.

Perfect- thank you so much!

You are most welcome here :slight_smile: