2024年10月09日 建站教程
wordpress如何对指定分类下的所有文章进行加密,下面web建站小编给大家简单介绍一下如何利用mysql语法实现这个功能!
利用mysql语法对指定分类下的所有文章进行加密
update wp_posts, wp_term_relationships, wp_term_taxonomy set wp_posts.post_password = 'abcdefg' where wp_posts.id = wp_term_relationships.object_id and wp_term_taxonomy.taxonomy = 'category' and wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id and wp_posts.post_status = 'publish' and wp_posts.post_type = 'post' and wp_term_taxonomy.term_id = '1';
本文链接:http://so.lmcjl.com/news/14974/