In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to replace WordPress custom column values in batches? This problem may be our daily study or work often see. I hope you learned something from this question. The following is the reference content brought to you by Xiaobian. Let's take a look together!
The following WordPress tutorial column to introduce you to replace WordPress custom column values in batches, I hope to help friends in need!
Add the following code to the current topic function template functions.php at the end:
global $wpdb;$wpdb->query("UPDATE wp_postmeta SET meta_value = replace( meta_value, 'https://www.baidu.com/','https://down.baidu.com/')");
The above example applies to modifying only the domain name in the link address, leaving the links behind the domain name unchanged.
For example: www.baidu.com/2020/01/file.zip
Replaced by: down.baidu.com/2020/01/file.zip
And so on.
After adding the code, refresh the page and replace it.
Please backup the data before operation, just in case!
After replacement, remove the above code.
Thank you for reading! After reading the above content, do you know about the method of replacing WordPress custom column values in batches? I hope the content of this article is helpful to everyone. If you want to know more about related articles, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.