Wordpress Web Application Development(Third Edition)
上QQ阅读APP看书,第一时间看更新

Scenario 1 - an online shopping cart

Assume that we are building an online shopping cart application to sell books. In this scenario, books can be matched to a custom post type that will be saved in the wp_posts table. We can match the post title to book title, post content to book description, and post type to book. Then, all the other book-related information, such as price, author, pages, and dimensions, can be stored in the wp_postmeta table with the associated book from the wp_posts table.