This code produces the same result as this solution however uses a vastly different solution. The code displays the logo on the front or home page and the site title & description on all other pages. You can add, remove or change the logo using the Header Image featured added to the WordPress customizer.
Here’s the demo video:
Here’s the code for logged in members: