Remove a custom options name/value pair

based on MMK’s help below, here’s the code: $toremove = 605 // I actually use a var like so $toremove = $_REQUEST[‘somevar’]; I’m just using 605 as an example $selectid = get_option(‘swcs_postpage_id’); $key = array_search ($toremove, $selectid); unset($selectid[$key]); update_option(swcs_postpage_id, $selectid);

WP_Error with multiple form validation message

Updating this for people who might have the same issue. //save the new post and return its ID $post_id = wp_insert_post($new_post); // This will redirect you to the newly created post (Using GUID) $post = get_post($post_id); wp_redirect($post->guid); exit(); Change above code to below code will solve the issue. $errors = write_here_errors()->get_error_messages(); // only create post … Read more

Unicode characters displaying as ? after import using WP Clone

I wanted to add this as a comment because I want to be brief, but SE will not let me do it since I just signed up. Anyway, I just faced the exact same issue you are facing. This blog post helped me: http://theblogpress.com/blog/seeing-weird-characters-on-blog-how-to-fix-wordpress-character-encoding-latin1-to-utf8/ As well as this thread: Character encoding issue after changing servers … Read more

Load plugins’.mo and .po files from a directory

This is, in fact, already available by default. If specific locale isn’t available in plugin’s folder WordPress will try to fallback to languages directory. It is defined by WP_LANG_DIR constant and for plugins the default location would be wp-content/languages/plugins. Note that name is expected to follow the specific format: name-locale.mo.