• Resolved johnny mosaic

    (@johnny-mosaic)


    I need to replace the standard search in the sketch theme with a media and tagged search…
    I have already found a new search plug-in watch the old sketch search button still shows up if the search returns no results. How can I remove the sketch search button and replace it with my other search button that searches media?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there! Please share a link to your site so we can take a look.

    This may be more of a question for plugin support, but I can take a look in case there’s something theme-specific we can help with on this end. 🙂

    Thread Starter johnny mosaic

    (@johnny-mosaic)

    Hi, thanks, I can’t, the site is in development and is pointed to my host computer locally.

    I need to remove the sketch search and replace it with something else that will search media names, descriptions, tags, etc…

    The only problem is, when i use my new search and if it returns no results based on the persons search, it automatically adds the sketch search box under the non-result so a person can search again. But i dont want the regular search bar to come up like that.

    Ah, okay. I tried on my own install of Sketch and the following CSS hid the search form (on the front page and also when it showed on the no results page):

    .search-form {
         display: none
    }

    (Note: If that hides the search in too many places, you may need to target the page specifically to hide it only on your search results page.)

    On my test site, the following CSS hid the search form on only the no results page:

    .search-no-results .search-form {
         display: none
    }

    Also, if you haven’t added CSS into your theme before, some additional info: If you add CSS to your theme, be sure to add it into a CSS editor (like Jetpack’s Custom CSS module) or a Child Theme so that your CSS won’t be lost each time the theme updates.

    Let me know if you have any questions! 🙂

    Thread Starter johnny mosaic

    (@johnny-mosaic)

    it didn’t work.

    Are you familiar with CSS? You may need to find a different selector (instead of search-form) to use on your end, if the default Sketch one isn’t working, since I can’t look at your specific site.

    This post has some information on how to use browser tools to find the correct selector:
    https://dailypost.wordpress.com/2013/07/25/css-selectors/

    Once you find what it’s called on your end, you can apply it in the same way by editing the CSS above to hide the search.

    Or, if you’d like to share more, I can look for the selector too. Run a search so you see the search box you want to hide, view page source there, then paste the code you see into pastebin.com. For Syntax Highlighting, choose HTML5. Then share the link here, and I can look in there for it.

    Thread Starter johnny mosaic

    (@johnny-mosaic)

    Thanks, i was able to make it work, you are the best!

    Awesome! Glad you got it working. And you’re welcome! 😀

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

The topic ‘replace standard search’ is closed to new replies.