Created
July 18, 2018 05:58
-
-
Save abid112/6f566a80f0283b5c529b7c4c0868bec7 to your computer and use it in GitHub Desktop.
Difference between get_stylesheet_directory_uri() | get_template_directory_uri() | get_stylesheet_uri()
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
To know the differnce of these 3 function of WP, we need to print this 3 function. | |
Lets say, Our theme name is "wp-rootstrap". We create a child theme named, "wp-rootstrap-child". Inside child theme, we created header.php | |
and write the bellow codes to see the results. | |
<?php echo get_stylesheet_directory_uri() ."<br>"; ?> | |
<?php echo get_template_directory_uri() ."<br>"; ?> | |
<?php echo get_stylesheet_uri() ."<br>"; ?> | |
Result: | |
http://www.rootstrap.wp/wp-content/themes/wp-rootstrap-child | |
http://www.rootstrap.wp/wp-content/themes/wp-rootstrap | |
http://www.rootstrap.wp/wp-content/themes/wp-rootstrap-child/style.css |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment