Title: Replace Words with (
Last modified: July 4, 2020

---

# Replace Words with (

 *  Resolved [jodaweb](https://wordpress.org/support/users/jodaweb/)
 * (@jodaweb)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/replace-words-with/)
 * Hi,
 * excuse me but my english is not the best.
 * My titles always have the following pattern:
    scientific name (trivial name)
 * I want to surround the first two, rarely the first three words with the HTML 
   tag em.
    _scientific name_ (trivial name)
 * My idea
    `template:(<em>[+iptc:2#105,str_replace( '(', '</em> (' )+])`
 * But I get the following error
    ERROR: Test; no closing parenthesis

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

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/replace-words-with/#post-13075329)
 * Thanks for your report – your English is fine.
 * I have reproduced your issue on my test system. It is a defect in the code that
   parses templates containing parentheses within quotes.
 * I will work on a fix and post an update here when I have progress to report. 
   Thank you for finding and reporting the MLA defect, and for your interest in 
   the plugin.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/replace-words-with/#post-13080289)
 * I have uploaded a new MLA Development Version dated 20200706 that contains a 
   fix for this issue. To get the Development Version you can follow the instructions
   in this earlier topic:
 * [PHP Warning on media upload with Polylang](https://wordpress.org/support/topic/php-warning-on-media-upload-with-polylang/#post-9625341)
 * It would be great if you can install the Development Version and let me know 
   how it works for you. I plan to update the MLA production version within a week
   or so.
 * I will leave this topic unresolved for now. Please let me know if you try the
   Development Version. Thanks for your help and for your interest in the plugin.
 *  Thread Starter [jodaweb](https://wordpress.org/support/users/jodaweb/)
 * (@jodaweb)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/replace-words-with/#post-13100259)
 * Hello David,
 * I’m sorry I was away for a few days.
    Thank you for your quick replies and efforts.
 * I currently only get `<em>` displayed.
 * `template:(<em>[+iptc:2#105,str_replace( '(', '</em> (' )+])`
    -  This reply was modified 5 years, 11 months ago by [jodaweb](https://wordpress.org/support/users/jodaweb/).
    -  This reply was modified 5 years, 11 months ago by [jodaweb](https://wordpress.org/support/users/jodaweb/).
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/replace-words-with/#post-13102181)
 * Thanks for your update and for taking the time to try out the Development Version.
 * I have just run a test on my own system and get the results I expected. In the
   2#105 field my sample contains:
 *     ```
       Headline for Butterfly Pattern (with parentheses)
       ```
   
 * Using your template in the Media/Assistant Bulk Edit area gives me:
 *     ```
       <em>Headline for Butterfly Pattern </em> (with parentheses)
       ```
   
 * If you can post a link to one or more of your own images I can investigate further.
   You can also try using something like this template to verify the content you
   are starting with:
 *     ```
       template:Headline is -([+iptc:2#105+])-
       ```
   
 * Let me know what you find out.
 *  Thread Starter [jodaweb](https://wordpress.org/support/users/jodaweb/)
 * (@jodaweb)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/replace-words-with/#post-13103557)
 * Thank you for your wonderful work. I have now re-entered it several times and
   now it works perfectly. I had done something wrong in handling. Thank you very
   much again.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/replace-words-with/#post-13106873)
 * Thanks for the positive feedback and for confirming that the fix is working on
   your site.
 * I am marking this topic resolved, but please update it if you have any problems
   or further questions regarding Content Templates that include parentheses.

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

The topic ‘Replace Words with (’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [David Lingren](https://wordpress.org/support/users/dglingren/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/replace-words-with/#post-13106873)
 * Status: resolved