Title: Possible to replace in HTML code only?
Last modified: January 31, 2025

---

# Possible to replace in HTML code only?

 *  Resolved [John](https://wordpress.org/support/users/dsl225/)
 * (@dsl225)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/possible-to-replace-in-html-code-only/)
 * Hello,
 * I need to find a shortcode [in brackets] in several pages and replace it with
   a **HTML string**. Meaning that the HTML code should be added only in the HTML
   version of the pages.
 * Is there a way to limit the search/replace only to HTML page/post versions?
 * Thanks.

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

 *  Plugin Support [Delicious Brains Support](https://wordpress.org/support/users/dbisupport/)
 * (@dbisupport)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/possible-to-replace-in-html-code-only/#post-18283147)
 * Hi [@dsl225](https://wordpress.org/support/users/dsl225/),
 * Better Search Replace Support Team here. Thanks for reaching out with your query!
   We would be happy to assist.
 * We understand that you need to do a find and replace only to HTML page/post versions.
   At the moment, Better Search Replace Support replaces all instances of a search
   keyword found on the tables selected.
 * If possible, you need to create the search keyword to be unique enough that only
   the intended pages/posts will be found then replaced.
 * Please let us know if there’s anything else we can help you with.
 *  Thread Starter [John](https://wordpress.org/support/users/dsl225/)
 * (@dsl225)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/possible-to-replace-in-html-code-only/#post-18283155)
 * Well noted, many thanks!

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

The topic ‘Possible to replace in HTML code only?’ is closed to new replies.

 * ![](https://ps.w.org/better-search-replace/assets/icon-256x256.png?rev=2706527)
 * [Better Search Replace](https://wordpress.org/plugins/better-search-replace/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-search-replace/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-search-replace/)
 * [Active Topics](https://wordpress.org/support/plugin/better-search-replace/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-search-replace/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-search-replace/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [John](https://wordpress.org/support/users/dsl225/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/possible-to-replace-in-html-code-only/#post-18283155)
 * Status: resolved