2010-05-30 107 views
2

I am trying to append a link to the text as shown below:<a href=...> syntax

<a href=\"http://blog.sysil.com/?page_id=5\">Contact Us</a> <br />Copyright © 2010 Stanley Lee. All Rights Reserved. 

However, it is not linking properly. Do you know what is causing the linking error? Thanks in advance for your help!

+0

我怎麼能把兩個queryString在的href? – MayureshP 2011-05-28 10:10:20

回答

5

The backslashes (\) before the quotation marks in your anchor tag are the problem; you only need those if you are trying to escape them in a string of a programming language (for example PHP).

Try:

<a href="http://blog.sysil.com/?page_id=5">Contact Us</a>... 
+0

我嘗試刪除反斜槓,但Wordpress仍然自動爲我添加它們。 – stanigator 2010-05-30 06:41:40

+3

我對Wordpress並不熟悉。這個問題最初並沒有提到那個細節。 :) – JYelton 2010-05-30 06:56:58

+0

只是一個想法:你可能會嘗試使用單引號'''而不是雙引號。 – JYelton 2010-05-30 07:57:59

1

Remove the backslashes that precede the double quotes and the link should work fine.

2

Read http://tutorialblog.org/use-embedit-to-add-html-code-in-wordpress/關於如何將HTML添加到wordpress。

Quote:「有時候你可能只能複製和粘貼代碼或直接寫HTML代碼到你的帖子中,要做到這一點,你只需點擊帖子頂部的HTML標籤,然後編寫或粘貼將代碼添加到您的帖子中併發布它。「

轉到HTML選項卡並在其中插入代碼應該可以防止WordPress添加額外的反斜槓。 :)

相關問題