The tag has no usage guidance.

learn more… | top users | synonyms

4
votes
1answer
661 views

Search/Replace for editor in HTML-mode

Is there a way to do a Search and Replace from the editor in HTML-mode? Plugins I found work in the visual editor, we are working only in HTML-mode, therefore -not- appropriate for what we do. I would ...
4
votes
1answer
1k views

How to change “Draft” string for status of custom post type to “Unavailable”?

ANSWER MOD: just an important mod to the chosen answer: // check if you actually have drafts; also avoids extra '|' separator if (isset($views['draft'])) { // 'Drafts' should be added (and come ...
0
votes
1answer
795 views

is wpdb->replace() already sanitized?

i am working on a plugin that includes table in database that holds information from the different posts. right now i use $wpdb->replace(), so whenever a post is being created or updated it is also ...
1
vote
1answer
731 views

printf and _n in this example?

what is the last $count in this example? printf( _n( 'You have published %s post.', 'You have published %s posts.', $count, 'myplugin' ), $count ); i guess the first one is to fill each ...
9
votes
1answer
3k views

Moving WP install from local to live, what about wp_posts GUID?

Done this before and i am still wondering what to do with the wp_posts => guid content, which has reference to http://localhost But at wordpress.org http://codex.wordpress.org/Changing_The_Site_URL ...
0
votes
1answer
171 views

Using str_replace on wp-admin

I'm currently having some difficulties getting this below snippet to work. The current outcome is it replaces nothing. I realize this particular question could also be solved using gettext, but I was ...
2
votes
2answers
5k views

Getting rid of the #038; when string replacing content

I'm trying to add some string replacements to the_title() - function format_title($content) { $content = str_replace('&','&<br>', $content); $content = ...
0
votes
1answer
253 views

Can I change the “Home” text in the menu?

I’m pretty sure this can be done with a filter or some kind of find and replace, but I’m not sure how. I have a page called “Home” like so: When the link is displayed in my template it says ...
0
votes
1answer
50 views

How can I replace content on site generated from plugin without changing plugin

I downloaded a login form but I'd like to change its content without actually changing the plugin files so that it won't cause problems when updating later on. How can this be done?
0
votes
1answer
219 views

Extract Information from post content (using regex?)

I'm trying to replace some custom strings in my content before saving the post. I have got the $data["post_content"] which includes strings like %replaceContent:{type}% . Now I need to extract that ...
0
votes
1answer
226 views

Rename Smart YouTube's httpv back to http for all posts

I've used the Smart YouTube plugin to embed YouTube videos into my blogs. The way I did it is to replace the http:// of the YouTube url with httpv:// as the plugin describes. But now I noticed that ...
0
votes
1answer
518 views

Global MySQL replacing of text patterns/matches

I'm familiar with this method... update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, ‘find this string’, ‘replace found string with this string’); The problem is, I'm trying to do this to all ...
0
votes
2answers
2k views

MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?

EDIT: I want to update one field (post_content) within a known record (id of 4) of a known table (wp_posts) in a new database (new_db). The update has to come from one field (post_content) within a ...
12
votes
8answers
65k views

What SQL Query to do a simple find and replace

Whenever I create a new website I first create a staging site on a subdomain like "stage.domain-name.com". After everything works correctly I export the database, open it in notepad++ and do a ...