2010-05-30 106 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添加额外的反斜杠。 :)

相关问题