php - Difference between get_template_directory_uri() and upload images to wordpress site -
i'm working wordpress , want understand difference between uploading image in media folder on wordpress dashboard in media folder, , use get_template_directory_uri();
retrieve theme directory , display images have stored in image folder so:
<img src="<?php echo get_template_directory_uri();?>/img/image.png">
are there of these solution better other?
thank you
you should thinking in terms of is content / resources static or dynamic?
if resource part of theme (ie. static), best use:
<img src="<?php echo get_template_directory_uri();?>/img/image.png">
if part of content , can changed wordpress user, use media uploads. alternative use options framework allow user change static resources.
Comments
Post a Comment