wordpress 直接操作数据库显示文章
有时我们想做一些爬虫直接放到wordpress 数据库里,然后在网站上直接显示出来,这是应该怎么做呢,其实很简单
如图,wp_post这张表就是放你文章的内容 时间,标题等等一些信息,让我们看一下表结构
ID ——自增id
post_author ——文章作者
post_date ——文章日期
post_date_gmt ——文章更新日期
post_content ——文章内容
post_title ——文章标题
post_excerpt ——摘要
post_status ——文章的状态(publish 发布,inherit 子文章 ,auto-draft 自动存稿)
comment_status ——评论状态
ping_status ————懒癌犯了。。。
post_password 。。。。
post_name
to_ping
pinged
post_modified
post_modified_gmt
post_content_filtered
post_parent
guid
menu_order
post_type
post_mime_type
comment_count
直接这张表了插入数据就会在网站上显示了,可以写个爬虫直接抓到这张表里
发表回复