Home Forums WoodMart support forum Replace Placeholder Text in Ajax Search

Replace Placeholder Text in Ajax Search

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #127469

    Edat
    Participant

    Hi Guys

    Is there a way to do a string replace in functions.php? I want to replace the placeholder text in the woodmart ajax search form.

    <input type="text" class="s" placeholder="Search for products" value="" name="s" autocomplete="off">

    I want to change “Search for products” to “Search products”

    Thanks

    #127502

    Hello,

    You can replace all theme and plugin texts via PO file in WordPress. Here is a video tutorial that should help you raplace your website texts with a Loco Translate plugin https://www.youtube.com/watch?v=D3NsDdMzsls&list=PLMw6W4rAaOgKKv0oexGHzpWBg1imvrval&index=3

    We do not recommend doing in theme files as after update all your customization would reset.

    Best Regards

    #154104

    Inzman
    Participant

    Hello.
    I made a child theme and it seems this string is one of the few ones that won’t translate. I have manual PO/MO files. In mobile menu as well as desktop search.
    Ideas?
    Thanks.

    #154120

    Hello,

    You can rewrite all theme and plugin texts via PO file in WordPress. Here is a video tutorial that should help you rewrite your website texts with a Loco Translate plugin https://www.youtube.com/watch?v=D3NsDdMzsls&list=PLMw6W4rAaOgKKv0oexGHzpWBg1imvrval&index=3

    We suggest you to keep translated files in wp-content/languages/themes/woodmart-pt_PT.po folder.

    You can delete the plugin as soon as you change the wording.

    Best Regards

    #154126

    Inzman
    Participant

    Thanks for the answer.
    I’m using POEdit, I don’t like installing plugins for such a small thing when more reasonable options are available.
    Keeping them in “themes/woodmart-child/languages” and all other strings are okay. But not this one…

    #154135

    Hello,

    Changing the pot file is the only way to change the text of the theme or plugin. You can do in code, however, you will have to restore the changes each time after the update.

    The theme supports Loco 100%, I cannot guarantee Poedit plugin. Perhaps you can transfer the translation into Loco.

    Best Regards

    #154139

    Inzman
    Participant

    POEdit is not a plugin, it is a software to edit POT, PO and generate MO. And that is what a I’m doing with it.
    Just saying that all translations work well when I change them, but not this one (Search for products)!
    But it seems we have difficulties understanding each other 🙂
    PS! I don’t have the need to change main theme files since I’m running a child theme.

    #154208

    Hello,

    Which theme version do you run? I checked in Po edit https://prnt.sc/pr90hw

    It seems that you have an outdated woodmart/languages/woodmart.pot file. You need to get it from the latest update.

    Best Regards

    #154662

    Inzman
    Participant

    Yes, it was the version issue.
    Thanks.

    #154691

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Replace Placeholder Text in Ajax Search’ is closed to new replies.