Snippets: Custom Logo Icon Output

If you are using the Logo Icon option in the customizer but want a different output you can easily hook into the theme's filter to alter the output. Below are 2 examples./

// Custom logo icon HTML (perhaps you are loading a custom font icon family on your site)
add_filter( 'wpex_header_logo_icon', function() {
	echo '<span class="YOUR_CUSTOM_FONT_ICON_CLASS" aria-hidden="true"><span>';
} );

// Example 2: Custom logo icon as image
add_filter( 'wpex_header_logo_icon', function() {
	echo '<img src="IMAGE_URL" alt="Site logo icon" />';
} );

Snippet Type: PHP

Posted Under: Logo

All PHP snippets should be added via a child theme's functions.php file.