Title: dben's Replies | WordPress.org

---

# dben

  [  ](https://wordpress.org/support/users/dben/)

 *   [Profile](https://wordpress.org/support/users/dben/)
 *   [Topics Started](https://wordpress.org/support/users/dben/topics/)
 *   [Replies Created](https://wordpress.org/support/users/dben/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/dben/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/dben/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/dben/engagements/)
 *   [Favorites](https://wordpress.org/support/users/dben/favorites/)

 Search replies:

## Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simple Text Replace] How replace string in Custom fields?](https://wordpress.org/support/topic/how-replace-string-in-custom-fields/)
 *  Plugin Author [dben](https://wordpress.org/support/users/dben/)
 * (@dben)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/how-replace-string-in-custom-fields/#post-3855960)
 * You should do something like this:
 *     ```
       // read custom field
       $customFieldValue = get_post_meta( $post_id, $key );
   
       // apply regular expression
       // you can set 'content' or 'title' in type argument to select which
       // expressions to apply (see options in WP admin)
       $customFieldValue = apply_regex_option($customFieldValue, 'content', '01');
       $customFieldValue = apply_regex_option($customFieldValue, 'content', '02');
       $customFieldValue = apply_regex_option($customFieldValue, 'content', '03');
       $customFieldValue = apply_regex_option($customFieldValue, 'content', '04');
       $customFieldValue = apply_regex_option($customFieldValue, 'content', '05');
       $customFieldValue = apply_regex_option($customFieldValue, 'content', '06');
       $customFieldValue = apply_regex_option($customFieldValue, 'content', '07');
       $customFieldValue = apply_regex_option($customFieldValue, 'content', '08');
       $customFieldValue = apply_regex_option($customFieldValue, 'content', '09');
       $customFieldValue = apply_regex_option($customFieldValue, 'content', '10');
   
       // save custom field
       add_post_meta($post_id, $meta_key, $meta_value);
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simple Text Replace] Can this replace string in the external links?](https://wordpress.org/support/topic/can-this-replace-string-in-the-external-links/)
 *  Plugin Author [dben](https://wordpress.org/support/users/dben/)
 * (@dben)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/can-this-replace-string-in-the-external-links/#post-3659081)
 * Same answer as the other question 🙂
 * You need to add text replace code in simple-text-replace_hooks.php.
    As you can
   see, by now only post content is replaced:
 * $post[‘post_content’] = apply_regex_option($post[‘post_content’], ‘content’, ’
   01’);
 * Let me know if you need more help
    daniele
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simple Text Replace] How replace string in Custom fields?](https://wordpress.org/support/topic/how-replace-string-in-custom-fields/)
 *  Plugin Author [dben](https://wordpress.org/support/users/dben/)
 * (@dben)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/how-replace-string-in-custom-fields/#post-3855958)
 * You need to add text replace code in simple-text-replace_hooks.php.
 * As you can see, by now only post content is replaced:
 * `$post['post_content'] = apply_regex_option($post['post_content'], 'content','
   01');`
 * Let me know if you need more help
 * daniele
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simple Text Replace] Can i use more than 10 words?](https://wordpress.org/support/topic/can-i-use-more-than-10-words/)
 *  Plugin Author [dben](https://wordpress.org/support/users/dben/)
 * (@dben)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/can-i-use-more-than-10-words/#post-3974083)
 * Hello, I’m the author of the plugin.
    Sorry for the delay, fortunately ritso 
   gave you the right answer:
 * you have to add the options (simple-text-replace_options.php) and apply the regex(
   simple-text-replace_hooks.php).
 * Regards,
    daniele
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Cannot edit Pages with Lensa theme.](https://wordpress.org/support/topic/cannot-edit-pages-with-lensa-theme/)
 *  [dben](https://wordpress.org/support/users/dben/)
 * (@dben)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/cannot-edit-pages-with-lensa-theme/#post-3585959)
 * Hi Clayton, I have the same problem: if I activate another theme i the editor
   works fine, with Lensa theme it doesn’t!
 * ([see screenshot](https://docs.google.com/file/d/0B5YriBE4d1ddWEwzRzk3S3Nsdjg/edit?usp=sharing))
 * Did you find a solution? I have a lot of contents and configuration in my blog
   and I don’t want to reinstall everything
 * Thanks a lot,
    daniele
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [visual/html editor and media not working](https://wordpress.org/support/topic/visualhtml-editor-and-media-not-working/)
 *  Thread Starter [dben](https://wordpress.org/support/users/dben/)
 * (@dben)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/visualhtml-editor-and-media-not-working/#post-3506842)
 * because the theme i use ([http://themeforest.net/item/smartstart-wp-responsive-html5-theme/2067920](http://themeforest.net/item/smartstart-wp-responsive-html5-theme/2067920))
   had some problems with wp 3.5

Viewing 6 replies - 1 through 6 (of 6 total)