Relative theme path in a tag
-
I am working on a theme for my new WP website and I am a bit rusty at it and have run into a problem.
I want to use or add images for some of the postmetadata (‘edit post’ and comments links), but I would rather not use an absolute path (https://www.url.com/wp-content/themes/themename/images/image.jpg) unless absolutely necessary.
Is there some way of calling the theme directory path inside of a template tag? A variable that I can use with the edit_post_link() function? So I would end up with something like:
<?php edit_post_link('<img src="<insert theme path>/images/edit.jpg" />', '', ' | '); ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Relative theme path in a tag’ is closed to new replies.