Giter Site home page Giter Site logo

rinsyan0518 / wp-serverless-search Goto Github PK

View Code? Open in Web Editor NEW

This project forked from getshifter/wp-serverless-search

0.0 0.0 0.0 395 KB

A static search plugin for WordPress.

Home Page: https://www.getshifter.io

JavaScript 41.94% PHP 48.74% CSS 9.32%

wp-serverless-search's Introduction

WP Serverless Search

A static search plugin for WordPress. Search through thousands of posts in milliseconds, with support for fuzzy matching and support for custom themes.

View Demo on Shifter

Installation

  1. Download WP Serverless Search WordPress Plugin as a Zip Archive
  2. Upload to your WordPress site or blog
  3. Activate

Customizing to your Theme

The default settings for this WordPress Plugin are designed to work with the official Twenty Seventeen WordPress Theme. However, you can customize these options for custom Themes for site search forms.

  1. Navigate to the WP Serverless Search WordPress Plugin Settings
  2. Update Form Class to best match your theme search form.
  3. Update Input Class to best match the input of the search form.

Finding Your Form and Input Class

The best way to do this is using your browser developer tools such as Inspect Element in Chrome, Developer Tools in Safari, etc.

For example, here is the site search form HTML from the twenty seventeen WordPress Theme.

In this example, our target Form Class could be form[role=search], form.search-form, or simply .search-form. You decide how specific you want to get, based on your Theme and needs.

For the Input Class, that could be any of the following: input[type=search], #search-form, input.search-field, etc.

Those values may change depending on your theme.

<form role="search" method="get" class="search-form" action="https://example.com/">
	<label for="search-form">
		<span class="screen-reader-text">Search for:</span>
	</label>
	<input
    type="search" id="search-form" class="search-field" placeholder="Search …" value="" name="s">
	<button type="submit" class="search-submit">
    <span class="screen-reader-text">Search</span>
  </button>
</form>

FAQs

Q: Is WP Serverless Search a WordPress site search plugin? A: Yes!

Q: Why did you build this? A: Few reasons:

  1. Native WordPress Search is slow and inaccurate.
  2. We needed a site search solution for static WordPress sites using Shifter, so we built one.

Q: Do I need to add a custom template, custom HTML, etc. to make it work? A: Nope.

Q: Is it free to use? A: Yah, go have fun.

Q: Is it fast? Yes, very fast.

Q: Why so fast? A: It uses simple JavaScript to search a static XML. No database queries or server resources are necessary while searching.

Q: My site is huge, is that an issue? A: Should be okay. We've tested WP Serverless Search up to ~1K posts and was able to return search results within milliseconds.

Q: Does it support Fuzzy search? e.g. Hallo, Halo, Hello, Helloooo A: Yes! It uses Fusejs to provide fuzzy search results for typos.

Q: Does it support Auto Complete? A: Yes, it will search and sort as you type.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.