Skip to content

Instantly share code, notes, and snippets.

@shrinkray
Created October 30, 2019 03:48
Show Gist options
  • Select an option

  • Save shrinkray/b186dbcd4f1430b2c5f93a6e21ce7bc9 to your computer and use it in GitHub Desktop.

Select an option

Save shrinkray/b186dbcd4f1430b2c5f93a6e21ce7bc9 to your computer and use it in GitHub Desktop.
Differences between site URL functions
/** Differences between site URL functions
*
* IMAGES
*
* bloginfo('template_directory'); Returns the wp-content url
* This is the full URL https://[root-domain]/wp-content/themes/[theme-folder]/images/opt-in-2.png
*/
<img src="<?php bloginfo('template_directory'); ?>/images/opt-in-4.png" class="pbl">
/**
* Returns site-url with path in theme
*
* LINKED SCRIPTS
*/
<script src="<?php echo get_site_url(); ?>/js/submit-root-form.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment