2 使用get_posts方法,參考:&" />

在 WordPress 里,如果我想首頁只顯示每個 category 下最新兩篇文章應該怎麼做?

應該加段什麼樣的代碼?


numberposts" =&> 2


使用get_posts方法,參考:
& "numberposts" =&>2,
"offset" =&> 0,
"category" =&> ,
"orderby" =&> "post_date",
"order" =&> "DESC",
"include" =&> ,
"exclude" =&> ,
"meta_key" =&> ,
"meta_value" =&> ,
"post_type" =&> "post",
"post_mime_type" =&> ,
"post_parent" =&> ,
"post_status" =&> "publish" ); ?&>

&


推薦閱讀:

類似http://nilssvensson.com/這類簡潔的攝影師個人網站如何搭建?是基於Wordpress嗎?
國內伺服器怎麼獲取Instagram圖片?

TAG:網頁設計 | PHP | WordPress |