2011-02-18 122 views

回答

1

取代返回結果的the_ID(),使用函數get_the_ID(),該函數返回ID,並且可以將它分配給要在php腳本中使用的變量。

$postid = get_the_ID(); 
/* do here what you need with $postid.. */ 

僅供參考,有WP的API的一個很好的官方資料庫,該CODEX