Bulk Edit, on solution
-
Hi,
I have find a solution for bulk editing in members plugin.
I wanted to add credentials for an entire post category with thousands of posts.
I did not find any answer on the web, so I have made a SQL request to add on your phpMyAdmin to.First, the most important, do an SQL backup of your database before any change !
Next, insert this code on your phpMyAdminINSERT INTO wp_postmeta (post_id,meta_key,meta_value) -- First find the ID of the post of a specific category (wp_posts.post_type) SELECT DISTINCT ID,'_members_access_role','subscriber' FROM wp_posts -- change 'subscriber' by the user type you wanted to change credentials JOIN wp_postmeta ON wp_postmeta.post_id = wp_posts.ID WHERE wp_postmeta.post_id NOT IN (SELECT ID FROM wp_postmeta JOIN wp_posts ON wp_posts.ID = wp_postmeta.post_id WHERE wp_postmeta.meta_key = ('_members_access_role')) -- check that the post did not have any previous credentials AND wp_posts.post_type = 'category_of_posts' -- change this name with the name of the posts' category you wanted to change the credentials
The topic ‘Bulk Edit, on solution’ is closed to new replies.