Created
January 20, 2019 03:39
-
-
Save abdhannan/5670b21d99cbc8534cb5248f50682211 to your computer and use it in GitHub Desktop.
Get URL image of custom logo wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get custom logo URL | |
* @link https://developer.wordpress.org/reference/functions/the_custom_logo/ | |
*/ | |
$custom_logo_id = get_theme_mod( 'custom_logo' ); | |
$image = wp_get_attachment_image_src( $custom_logo_id, 'full'); | |
?> | |
<img src="<?php echo $image[0]; ?>" class="img-fluid"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment