Skip to content

Instantly share code, notes, and snippets.

@AlexMcowkin
Created March 13, 2015 14:45
Show Gist options
  • Save AlexMcowkin/1d4490467a45a1c27779 to your computer and use it in GitHub Desktop.
Save AlexMcowkin/1d4490467a45a1c27779 to your computer and use it in GitHub Desktop.
WP constants usage
<?php
// в файле wp-config.php добавляем константу
define('MY_THEME', 'http://mysite.loc/your-url-here/')
// а уже в других файлах где нам надо указываем MY_THEME
echo '<img src="'.MY_THEME.'/link-to-0image" />';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment