Articles of bulk

Renaming Custom Taxonomy Values

I’m new to WordPress and have been tasked to migrate an existing non-Wordpress site to WordPress. Our original site has each page associated to a country. I’ve been reading a lot and I believe I need to create a custom post type (“Country Pages”) and a custom taxonomy (“Country”). The problem I have is with […]

Bulk delete users by role? SQL?

I need to bulk-delete a large number (4,321) of users, all of a particular role type (not an out-of-the-box role name). I have tried several functions found online, and have tried the Bulk Delete (WPBulk) plugin, but both throw a 500 server error. (I recently extended by server’s max value to allow for more processing). […]

transition_post_status doesn't work with bulk updates

I have successfully setup an action that executes when a custom post type is moved from “pending” to “publish” status. Everything works as expected when you change the post status individually (press the “Publish” button on the individual post edit page). However, when using the Bulk Actions on the overview page for the custom post […]

Bulk delete WordPress posts with phpMyAdmin

I have over 8,000 posts generated by wp-o-matic and I want to get rid of all of them. I want to execute this query in phpMyAdmin. I just want to make sure this is safe to run and it’s not wiping out my pages. This is the query: DELETE FROM ‘wp_posts’ WHERE ‘post_type’ = ‘post’ […]

Modify wording of bulk options

I would like to modify the wording in the bulk actions on the posts screen or custom post types. I am trying to do so using the following code, but it’s not working. Any idea why? add_filter( ‘bulk_actions-edit-post’, ‘my_custom_bulk_actions’ ); function my_custom_bulk_actions( $actions ){ $actions[‘trash’] = ‘Just testing’; unset( $actions[ ‘edit’ ] ); return $actions; […]

UWooCommerce – add cart discount programmatically?

I need to develop a plugin that applies a discount to the cart if x number of products have been purchased. Could someone point me in the direction of the code/API I need to use. Can find nothing from https://docs.woothemes.com/documentation/plugins/woocommerce/woocommerce-codex/ and do not fancy paying $100+ for the official bulk discount plugin just to get […]

How to remove bulk edit options

Is it possible to completely disable Bulk Edit functionality? I’m using WordPress 3.1.

Is there a way to expose additional fields to the Bulk Action > Edit functionality?

I would like to know if it’s possible (using the existing WordPress core development features) to hook into the existing WP Bulk Action > Edit functionality, in order to expose additional fields to the edit action? I sometimes come across plug-ins that create custom post types, and related custom fields, and then they fail to […]

URL Redirect and Bulk Actions in wp_list_table

I am using the Custom List Table Example plugin as a basis to create my own custom list table. Everything is great, except one thorny point. When I am processing bulk actions via the process_bulk_action() method, I would like to redirect using wp_redirect(). Here is an example: function process_bulk_action() { // Some security check code […]

Bulk update all posts from plugin settings screen

I’m writing a plugin right now that will populate custom metadata for all posts on the site based on a certain rule. I’ve already created a Plugin’s settings page and a logic that should be triggered for each post. See below: add_action(‘admin_menu’, ‘plugin_admin_page’); function plugin_admin_page() { add_options_page(‘Plugin Page’, ‘Plugin Section’, ‘manage_options’, ‘plugin_page’, ‘plugin_options_page’); } function […]