2011-05-19 67 views

回答

0

對於有幾個選項:

WordPress的辦法是使用get_permalink($ POST_ID)

<?php 
global $post 
$link = get_permalink($post->ID); 

或者你可以使用這裏顯示的REQUEST_URI:http://wordpress.org/support/topic/get-current-page-url

+0

奔我don'不知道我在哪裏可以找到永久鏈接和寫在哪裏。所以請告訴我該怎麼做。 – MOIN 2011-05-19 08:36:44

+0

我剛剛在single.php頁面添加了這段代碼後,你會得到<?php the_permalink()?> – MOIN 2011-05-19 11:27:33

+0

很高興你解決了它。 – Ben 2011-05-20 06:55:15