Replace bloginfo('template_directory') with bloginfo('stylesheet_directory') - Great for child themes
This file contains 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
if( !function_exists('replace_template_directory_with_stylesheet_directory')): | |
function replace_template_directory_with_stylesheet_directory($text, $show){ | |
if( $show == 'template_directory' ) | |
$text = get_bloginfo('stylesheet_directory'); | |
return $text; | |
}//end replace_template_directory_with_stylesheet_directory | |
endif; //replace_template_directory_with_stylesheet_directory function does not exist | |
add_filter('bloginfo_url', 'replace_template_directory_with_stylesheet_directory', 10, 2); //hook replace_template_directory_with_stylesheet_directory function to bloginfo_url info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment