0
我開始在文字按下文章目錄。我想在同一頁面的末尾添加文章網址。 如何編寫該代碼。 例如http://ezinearticles.com/?Motorcycle-Audio---Accessorize-With-A-Helmet-With-Speakers&id=6279817
在這裏末尾URL給出。 謝謝。如何在同一頁面底部添加文章頁面網址?
我開始在文字按下文章目錄。我想在同一頁面的末尾添加文章網址。 如何編寫該代碼。 例如http://ezinearticles.com/?Motorcycle-Audio---Accessorize-With-A-Helmet-With-Speakers&id=6279817
在這裏末尾URL給出。 謝謝。如何在同一頁面底部添加文章頁面網址?
對於有幾個選項:
WordPress的辦法是使用get_permalink($ POST_ID)
<?php
global $post
$link = get_permalink($post->ID);
或者你可以使用這裏顯示的REQUEST_URI:http://wordpress.org/support/topic/get-current-page-url
奔我don'不知道我在哪裏可以找到永久鏈接和寫在哪裏。所以請告訴我該怎麼做。 – MOIN 2011-05-19 08:36:44
我剛剛在single.php頁面添加了這段代碼後,你會得到<?php the_permalink()?> – MOIN 2011-05-19 11:27:33
很高興你解決了它。 – Ben 2011-05-20 06:55:15