get_stylesheet_directory_uri()
-
I don’t like to post code that might be too particular, but I have a very specific function that is not going relative. I’m using the storefront theme.
// Update site logo function storefront_custom_logo() { remove_action( 'storefront_header', 'storefront_site_branding', 20 ); add_action( 'storefront_header', 'storefront_display_custom_logo', 20 ); } add_action( 'init', 'storefront_custom_logo' ); // Auxiliar function function storefront_display_custom_logo() { ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> <img src="<?= get_stylesheet_directory_uri(); ?>/img/img.png" alt="" /> </a> <?php }
get_stylesheet_directory_uri
works in other places, so I don’t know what is causing the issue here but none of those 2 paths are working. Perhaps is it the init function?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘get_stylesheet_directory_uri()’ is closed to new replies.