Descriere
Relevanssi Live Ajax Search enables ajax live search for your search forms. It won’t swamp you with settings, and generally, Relevanssi Live Ajax Search works without any modifications necessary. If you want to customize it, you have complete control over how it works and what it does.
Relevanssi Live Ajax Search displays the search results using templates. You can easily override the default templates from your theme to make the results look the way you want them to look.
Funcționează foarte bine cu Relevanssi
Relevanssi Live Ajax Search only provides you with live search results. To get really good results, use Relevanssi, Relevanssi Premium or Relevanssi Light. Relevanssi Live Ajax Search automatically uses Relevanssi to power the search results if Relevanssi is installed and active. However, you don’t need Relevanssi; Relevanssi Live Ajax Search also works with the default WP search.
Modificări de la SearchWP Live Ajax Search
Relevanssi Live Ajax Search is a fork of SearchWP Live Ajax Search. I forked it from version 1.6.1 because it looked like SearchWP Live Ajax Search wasn’t getting updates anymore. I also wanted to improve the Relevanssi compatibility.
Relevanssi Live Ajax Search drops all SearchWP compatibility. You can use SearchWP Live Ajax Search, which has built-in SearchWP support.
The widget has also been removed. It was unnecessary and outdated.
Relevanssi Live Ajax Search can now take over the Gutenberg core/search search form.
Acest modul este pe GitHub
Feel free to open up issues at
https://github.com/msaari/relevanssi-live-ajax-search.
Instalare
- Install the plugin from the WordPress plugin screen.
- Activează modulul.
- Gata! De cele mai multe ori, asta este tot ce ai nevoie.
If Relevanssi Live Ajax Search does not automatically attach itself to your search form, you can enable it by adding a single HTML5 data attribute (data-rlvlive="true") to the input field of your search form. You can find more information in the plugin documentation.
Întrebări frecvente
-
Cum creez un șablon personalizat pentru rezultatele de căutare
-
Relevanssi Live Ajax Search uses a template loader, making it easy to replace the search results. There is a
templatesfolder in the plugin folder, which includessearch-results.php. This file is the template used to output search results. To customize the search results:- Create a folder called
relevanssi-live-ajax-searchin your theme directory. - Copiază fișierul
search-results.phpîn dosarul nou. - Relevanssi Live Ajax Search va utiliza acum acel fișier pentru a afișa rezultatele.
If you want to override the default CSS styles, you can remove them this way:
add_filter( 'relevanssi_live_search_base_styles', '__return_false' );Acest cârlig de filtrare înlătură stilurile de bază care controlează poziția rezultatului de căutare live.
wp_dequeue_style( 'relevanssi-live-search' );Asta înlătură stilurile actuale pentru rezultatele de căutare.
- Create a folder called
-
I’m using Astra, Storefront, or Divi, and this plugin doesn’t work
-
It does, Astra search form is just designed in a way that hides the search results. You can find solutions in the plugin documentation. The easiest solution is adding this to your theme
functions.php:add_filter( 'relevanssi_live_search_add_result_div', '__return_false' ); -
Vreau să modific numărul de rezultate afișate
-
There’s a filter for that! Add this to your theme functions.php or in a code snippet:
add_filter( 'relevanssi_live_search_posts_per_page', function() { return 10; } );Va arăta 10 rezultate. Poți să ajustezi numărul așa cum vrei.
-
Folosesc WPML și nu obțin niciun rezultat!
-
For some reason, the combination of Relevanssi Live Ajax Search, Relevanssi and WPML leads to problems. To solve this problem, use the
WP_Querymode of fetching the results. To activate the mode, add this to your theme functions.php:add_filter( 'relevanssi_live_search_mode', function() { return 'wp_query'; } );This will make Relevanssi Live Ajax Search use a different method of fetching the results. This method is compatible with WPML. This method uses the
search-results-query.phptemplate instead of the defaultsearch-results.phptemplate in Relevanssi Live Ajax Search, so take note if you want to customize the template to use the right base template for your customization.
Recenzii
Contributori și dezvoltatori
„Relevanssi Live Ajax Search” este un software open-source. La acest modul au contribuit următoarele persoane.
Contributori„Relevanssi Live Ajax Search” a fost tradus în 13 locale. Mulțumim traducătorilor pentru contribuția lor.
Tradu „Relevanssi Live Ajax Search” în limba ta.
Te interesează dezvoltarea?
Răsfoiește codul, vezi depozitarul SVN, sau abonează-te la jurnalul de dezvoltare prin RSS.
Istoric modificări
2.6
- Security update: This plugin could be used for blind oracle attacks to find out information on private posts. This has been blocked.
- New feature: Post type, post ID and term ID are now added to the results template as data attributes for better CSS targeting. Contributor: Marco Almeida.
- New feature: New filter hook
relevanssi_live_search_result_arrowfilters the»arrow in the search results. Contributor: Marco Almeida. - New feature: Action hooks
relevanssi_live_search_before_result,relevanssi_live_search_before_result_link,relevanssi_live_search_before_result_title,relevanssi_live_search_after_result_title,relevanssi_live_search_after_result_link,relevanssi_live_search_after_resultallow you to inject content to the search results without modifying the template. Contributor: Marco Almeida.
