![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Apr 2008
Posts: 529
|
Search and replace for wordpress?
This is the problem that I have. I have an iframe ad in about 500 posts on a blog. I would like to replace this ad. I tried Find replace and another one. Neither of them seemed to work. Are there any plugins that can search for the iframe code in the posts and replace it with something else?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Industry Role:
Join Date: Oct 2001
Location: ┌∩┐ ◣_◢ ┌∩┐
Posts: 46,909
|
Whatever you use for this, be very careful.
I had a search and replace plugin that worked fine...Until it didn't and it rewrote every one off my posts. Thankfully I had a current backup or I would have been completely screwed. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
(>^_^)b
Industry Role:
Join Date: Dec 2011
Posts: 7,223
|
For that many posts, I would export the xml then open in notepad then find/replace all to delete or replace the iframe code then reimport (Test on a freehost or test WPMU subdomain to see if posts import correctly first before replacing posts) Find/replace plugins suck
__________________
![]() I've referred over $1.7mil in spending this past year, you should join in. ![]() ![]() I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years.. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: May 2002
Posts: 8,120
|
Yea, make sure you backup your shit and avoid this problem next time by using an ad management system or server side/php include instead of hardcopy.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
So fuckin' bored
Industry Role:
Join Date: Jun 2003
Posts: 32,384
|
Quote:
__________________
Obey the Cowgod |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Jan 2008
Posts: 168
|
UPDATE [your_table_name] SET [your_table_field] = REPLACE([your_table_field], '[string_to_find]' , '[string_to_be_replaced]');
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Unregistered Abuser
Industry Role:
Join Date: Oct 2007
Posts: 15,547
|
or you could just use this plugin
http://wordpress.org/extend/plugins/search-and-replace/ which works perfectly |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
SEO SPECIALIST
Industry Role:
Join Date: Nov 2010
Location: Europe
Posts: 2,438
|
If you have access to wp database you can use a code like this in your phpMyAdmin -> mySQL:
UPDATE wp_posts SET post_content = replace( post_content, 'old text', 'new text' ) ; UPDATE wp_posts SET post_content = REPLACE (post_content, ‘old text’, ‘adultforum.ro’); UPDATE `table_name` SET `field_name` = replace(same_field_name, 'unwanted_text', 'wanted_text')
__________________
ICQ#: 376883609 Skype: AdultSEO [email protected] SEO Specialists - will make it happen. Awesome domains for sale - Reserve yours now. It’s never too late to MAKE MONEY with BITCOIN. Use this link and receive a 10% fee discount for 6 months. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |