WordPress Get Post by Slug(post_name)

Categories: Development NotesPHPWordPress; Tagged with: ; @ July 19th, 2010 20:43

需求: 依照Slug获得Post.

解决方案: API只有getPost(by ID), 我们要创建一个getPostBySlug. (Slug具有唯一性, 可参见表wp_posts,post_name 及有关代码)

(more…)



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.