Hard coded paths in widgets. Not recommended?

My host provider recommends that I “do not hard code paths into your ASP files.” I have a Wordpress site, and most of the paths are automatically generated and not hard coded, but I have a few hard coded paths in my text widgets. My host provider has provided some code, but I’m not sure how to use it:

path=server.mappath(filename)

Currently, in my text widget I have a link to an image:

<img  alt="" src="http://66.203.148.223/wp-content/uploads/2014/04/luxury-realestate-white.png" />

I tried this but it does not work:

<img  alt="" src="path=server.mappath/wp-content/uploads/2014/04/luxury-realestate-white.png" />

What am I doing wrong? What is the recommended method to making links in widgets?

Thanks,

Ak

Why don’t you just use a relative URL:

That way the image SRC will work on whatever domain you use.

Of course a more foolproof way would be to use a global variable, or system specific variable to call in the domain name that’s set in your configuration:

Relative path. Of course. All this complicated Wordpress stuff makes me forget the obvious.

Thanks

Ak