Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // set logo
- if (!has_custom_logo()) {
- // set logo of site to an image located at http://www.example.com/myimage.png
- }
- if( ! has_custom_logo() ) {
- add_filter( 'wp_get_attachment_image_src', '__return_dummy_logo_src' );
- the_custom_logo();
- remove_filter( 'wp_get_attachment_image_src', '__return_dummy_logo_src' );
- }
- function __return_dummy_logo_src( $src ) {
- return 'https://example.com/image.jpg';
- }
Add Comment
Please, Sign In to add comment