No Records Found Fallback Search

This topic contains 5 replies, has 4 voices, and was last updated by  Alex Rollin 6 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #425029

    Rich Harris
    Expired Member
    Post count: 37

    I recognize that this may be too custom for support here, but if someone can point me in the right direction, I’d be grateful.

    When searching on the map, if there are no results, you get a “No results found” message.” I can edit the text in plugins > geodirectory > language.php:80, and of course I can style the css to the ends of the earth. However, I can’t figure out how I might be able to insert some html there.
    [EDIT: I can just put the html in language.php! It works fine. ]

    I’d like to replace the message with something like:

    <p>No results found, adjust your criteria above or try a broader search:</p> <form role="search" method="get" action="#"><div><input type="text" placeholder="Search term"><input type="submit"></div></form>

    Putting a search form or custom link in that field would be great.
    (since the site search can actually find entries in any custom post type, it makes a good fallback for those searching for a listing in the wrong category…

    Thanks! (Sometimes it questions answer themselves, you can close this request!!)
    Staging site: montclaircenter.cainhostingdev.com/where-to-go/

    #425030

    Guust
    Moderator
    Post count: 29970

    You can do that using the recommended translation process at https://wpgeodirectory.com/docs/translate-core/

    You can use HTML when using that process.

    Thanks

    #425035

    Rich Harris
    Expired Member
    Post count: 37

    Thanks so much – can you point me towards protecting a plugin file from updates? I use a child theme for some edits, but a child plugin doesn’t sound right.

    #425044

    Kor
    Moderator
    Post count: 16516

    Hi Rich,

    You can’t protect a plugin from updates. An update will replace the entire plugin with a new copy. Did you check out the translation process here? https://wpgeodirectory.com/docs/translate-core/ . It is done outside the plugin folder.

    #425048

    Rich Harris
    Expired Member
    Post count: 37

    I was afraid that would be the answer 🙁 It does make sense…

    I found the translation process way longer than just editing some code, I believe I have to install local software and download files. I was hoping for something more streamlined. But I guess I will just have to learn the method. I kept a good record of what files I edit, just in case I wanted to keep my edits 😉
    Thank you.

    #425053

    Alex Rollin
    Moderator
    Post count: 27815

    I hope you find that after editing one string and becoming familiar with the process that you will find many more strings to help make your site ‘speak’ more to your niche.

    (and I agree that it is a bit of a ‘retro’ process)

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket