The following column WordPress Tutorial will introduce to you how to batch clear the summary content of WordPress articles. I hope it will be helpful to friends in need!
Sometimes when converting data from other website programs to WordPress, spaces will automatically appear in the "summary" of the article, or you don't want these summary contents at all after switching to WP. We can pass Execute SQL statements to clear summary contents in batches.
Add the following code to the current theme functions.php:
global $wpdb; $wpdb->query( " UPDATE wp_posts SET post_excerpt = '' " );
After that, refresh the website page and the summary content will be cleared from the database. It is enough to run this code once, there is no need to keep it in the theme, just delete it after use.
Tips: Please back up your data in advance before operation, just in case!
The above is the detailed content of Clear WordPress article summary content in batches. For more information, please follow other related articles on the PHP Chinese website!