根据查询监视器插件,Wordpress正在为数据库中的最后10篇帖子调用四个查询,从这里开始了解ID:
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts
WHERE 1=1
AND wp_posts.post_type = \'post\'
AND (wp_posts.post_status = \'publish\'
OR wp_posts.post_status = \'private\')
ORDER BY wp_posts.post_date DESC
LIMIT 0, 10
随后将显示以下内容和另外两个内容:
SELECT wp_posts.*
FROM wp_posts
WHERE ID IN (29,27,26,25,24,23,22,21,20,18)
我正在使用自定义模板,所以我不需要它,有没有办法禁用它?