0

How do I use an if else statement to display site title if no site logo is selected in the customizer when using jetpack? I have php code written but it's not working. I think it's because function_exists('jetpack_the_site_logo') checks to see if jet pack is activated, not whether the Site Logo section contains an image:

<?php if (function_exists('jetpack_the_site_logo')) : ?> <?php jetpack_the_site_logo(); ?> <?php else : ?> <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> <?php endif; ?>

0

According to this the jetpack_has_site_logo(); is what I need to accomplish this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.