WordPress URLの読み込みでよく使う関数 トップ/テーマ
WordPress 4.7から利用ができる関数が増えました。
get_theme_file_uri |
<?php echo get_theme_file_uri(); ?>
http://example.com/wp-content/themes/mytheme
http://example.com/wp-content/themes/mytheme/img/top_bana.png |
---|---|
get_theme_file_path |
<?php echo get_theme_file_path(); ?> C:\xampp\htdocs\wp/wp-content/themes/mytheme
|