WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created an ad for a merchant wanting to rent ad space on my website home page. After creating the ad, (anchor text and pic/graphics with embedded hyperlink) the merchant has requested I remove my url from the ad code. The anchor text along with the embedded hyperlinks links to the merchant's home page.

Problem is I don't know how my url was added to the code as I never inputted it in the original code in the first place. Somehow it was added by I think, WordPress or my server (PHP).

When I view the page source I do see my url was added to the ad code.

Can anyone help explain this and tell me how I can remove the url? Also, if I am able later to remove my url, how will it affect the hyperlink and anchor text?

Thank you, -Dan

Hi s_ha_dum,

I have read your answer and have now made sure the code reads as abosolute url.

Here it is with absolute url:

<strong>If you are interested in helping others treat and prevent hypertension, consider a healthcare degree from <a href="http://elearning.loyno.edu/">Loyola Online Courses today!</a></strong>

It still shows in page source however with my url addended to the code string.

What am I not understanding? Thank you!

share|improve this question
Please post the relevant code. I don't see how this can be answered without that. – s_ha_dum Feb 24 '13 at 6:00
Thank you...here is the ad code as I inputted it inside the article itself via WP-Admin's 'Edit Page' function while using html view: – DPano Feb 24 '13 at 13:09
<strong>If you are interested in helping others treat and prevent hypertension, consider a healthcare degree from <a href="elearning.loyno.edu/">Loyola Online Courses today!</a></strong> <a href="elearning.loyno.edu/">; <img src="managementofhypertension.com/wp-content/uploads/2013/02/…; alt="" /></a> – DPano Feb 24 '13 at 13:09
Code as it appears in page source view <strong>If you are interested in helping others treat and prevent hypertension, consider a healthcare degree from <a target="_blank" rel="nofollow" href="managementofhypertension.com/goto/http://elearning.loyno.edu/…; >Loyola Online Courses today!</a></strong> – DPano Feb 24 '13 at 13:16
Edit your question to include the code, please. Code is hard to read in the comments. – s_ha_dum Feb 24 '13 at 14:34

Your problem is that you are using relative URLs-- that is URLs, that include only part of the web address. What is taking on your URL is the browser, not WordPress. Browsers have long done this. Here is how it is supposed to work.

If you provide an absolute URL nothing happens-- for example, http://www.example.com. The idea is that you can use shorthand version of the URL. If you had a directory at /filesystem/path/to/www.example.com/images/ then a file named here.html located at http://www.example.com/here.html could use urls like images/image1.jpg to load the images. The browser will assume the first part of the URL is "this URL" and create http://www.example.com/images/image1.jpg. The relative URL is always relative to "this URL".

What is happening in your case is that you are providing the relative URL of, for example, elearning.loyno.edu/, so the browser is filling in the rest creating http://yoursite.com/elearning.loyno.edu/. Your URLs are relative because you've left off the scheme-- the http:// part. (My editors do it too.... a lot. :) )

You just need to provide the complete, absolute url for those links-- aka., add the http:// bit.

While it doesn't effect you in this case since you are loading external URLs, this relative URL issue is especially tricky inside WordPress because pages don't really load from the locations they appear to load from, at least not when pretty permalinks are enabled. In short, just don't use relative URLs.

share|improve this answer
Hi @s_ha_dum, I have responded to your comment inside my question by editing the question. – DPano Feb 24 '13 at 16:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.