2012-12-27 37 views
0

要顯示wordpess我用<p><?php the_content();?></p>內容,但我得到驗證錯誤:WordPress的the_content()驗證錯誤

Line 94, Column 3: document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag 
<p>For companies that are willing to minimize their accounting costs or jus bar… 

如果我改變pspan我得到同樣的錯誤,也許有人知道的任何解決方案來解決這個prolbem驗證錯誤?

回答

0

the_content()已經有p個元素,所以沒有必要把它包裝在p中。

我會建議把它包裝在一個div中。

+0

好的,不是壞的解決方案;) –

+0

正如@Klevis所說 - 默認情況下,the_content()運行wpautop,它將位置段落標記放置在需要的位置。除非需要表示,否則可以輸出'<?php the_content(); />' –