image - How do I reference a local file properly? -
i'm running wordpress on wamp right , i'm trying figure out how correctly reference image i'm using in header pages.
if write this:
<img src="wp-content/themes/my-theme/images/ssblogoalpha.png">
the logo shows on wp homepage, not on subsequent pages.
if write
<img src="../wp-content/themes/my-theme/images/ssblogoalpha.png">
the logo shows on subsequent pages, not homepage.
to honest don't know "../"
or root folder supposed when writing directory path these ways i've seen other people this. ideas? thanks!
you can images following way
<img src="<?php bloginfo('template_directory'); ?>/images/ssblogoalpha.png" alt=""/>
Comments
Post a Comment