Title: Correct command to replace string on two lines
Last modified: December 24, 2025

---

# Correct command to replace string on two lines

 *  Resolved [olistic](https://wordpress.org/support/users/olistic/)
 * (@olistic)
 * [5 months, 1 week ago](https://wordpress.org/support/topic/correct-command-to-replace-string-on-two-lines/)
 * Hi,
 * I’d like to add a string under the last one of multiple posts, but I don’t know
   how to insert the string in the “Replace with”.
 * Here’s my case…
 * [Sassy_Social_Share] is the last string of my posts and I need to add a string
   under this one.
 * I’ve tried writing [Sassy_Social_Share] newstring in the “Replace with” field
   but it doesn’t work as I need, while the new string follows [Sassy_Social_Share]
   in the same line.
 * What should I write in the “Replace with” field to have the string [Sassy_Social_Share]
   in my posts and the new string **underneath**?
 * Thank you in advance!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcorrect-command-to-replace-string-on-two-lines%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [Delicious Brains Support](https://wordpress.org/support/users/dbisupport/)
 * (@dbisupport)
 * [5 months, 1 week ago](https://wordpress.org/support/topic/correct-command-to-replace-string-on-two-lines/#post-18770375)
 * Hi [@olistic](https://wordpress.org/support/users/olistic/)!
 * Better Search Replace Support Team here. Thanks for reaching out with your query!
   We would be happy to assist.
 * To insert a new string below an existing one, you can include a [line break **<br>**](https://www.w3schools.com/tags/tag_br.asp)
   or wrap the new string in a [container like **<div>**](https://www.w3schools.com/tags/tag_div.asp)
   in the “Replace with” field.
 * How this appears on your site depends on how your theme or page builder displays
   content. Because of this, we recommend checking which option gives you the desired
   result before running a search and replace process. Please also create a backup
   first, to be safe.
 * Let us know if there’s anything else we can help you with.

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcorrect-command-to-replace-string-on-two-lines%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Delicious Brains Support](https://wordpress.org/support/users/dbisupport/)
 * Last activity: [5 months, 1 week ago](https://wordpress.org/support/topic/correct-command-to-replace-string-on-two-lines/#post-18770375)
 * Status: resolved