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

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -