Paco Live Search & Directory

Description

Paco Live Search & Directory lets you build a searchable directory for any kind of site: businesses, products, properties, courses, events, members… You define the fields, add your records, and show the search anywhere with a shortcode.

Main features

  • Your own fields. Create text and number fields (price, phone, brand, city…) and choose for each one whether it is searchable, shown as a filter, and shown in the results card.
  • Live search. Results update while the visitor types, without reloading the page. It still works as a normal form if JavaScript is disabled.
  • Fast on large catalogs. The plugin keeps its own search index (MySQL FULLTEXT when available) instead of scanning every record on each search.
  • Forgiving search. Ignores accents and capital letters and matches the beginning of words, so “mad” finds “Madrid”.
  • Filters. Dropdown filters, minimum/maximum ranges for numbers, and a category filter.
  • Categories and pagination.
  • Record page. Each record gets its own page that shows its fields in a clean table.
  • Your own URLs. Choose the URL base (for example /directory/ or /products/) and the names used for one record and for all records.
  • Mobile first. Responsive layout styled with CSS variables, so it is easy to adapt to your theme.
  • Translation ready. Fully prepared to be translated into any language.
  • Safe uninstall. Your data is kept when you delete the plugin, unless you explicitly tick the option to remove everything.

How to use it

  1. Go to Live Search > Fields and create the fields your records need.
  2. Go to Live Search > Records and add your records.
  3. Add the shortcode [querypress] to any page.

Shortcode options

  • per_page – number of results per page.
  • category – show only records from a category (slug).
  • show_filters – yes or no.
  • show_category_filter – yes or no.

Example: [querypress per_page="12" category="restaurants"]

For developers

The plugin offers hooks and filters (prefixed querypress_) to extend fields, sanitization, the record page and the post type arguments.

Installation

  1. Upload the paco-live-search folder to /wp-content/plugins/, or install it from the Plugins screen.
  2. Activate the plugin.
  3. Create your fields in Live Search > Fields.
  4. Add records and place [querypress] on a page.

If you import records directly into the database or restore a backup, open Live Search > Search index and click “Rebuild index”.

FAQ

Does it work with any theme?

Yes. It uses your theme’s page and single templates and adds its own scoped styles.

Why is a search result missing?

Open Live Search > Search index. If it says some records are missing, click “Rebuild index”.

Can I change the URL of the records?

Yes, in Live Search > Settings. If your site is already live and indexed, set up redirects from the old URLs.

What happens to my data if I delete the plugin?

Nothing, by default. Your fields, settings and records are kept. To remove everything, tick the option in Live Search > Settings before deleting the plugin.

Does it add anything to my front end on other pages?

No. Styles and scripts load only on pages that contain the shortcode.

Can developers extend the plugin?

Yes. Besides the existing filters and actions, the plugin offers these hooks:

  • querypress_field_value_html – change the HTML of a value in the cards and on the record page (for example, to make a phone number a link).
  • querypress_filter_option_label – change the text of the options of a filter dropdown.
  • querypress_container_classes and querypress_card_classes – add CSS classes to the search box and to each result card.
  • querypress_card_start and querypress_card_end – print extra content inside each result card.
  • querypress_sort_rules – change the order of the results (records first, by a field, by title or by date).

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Paco Live Search & Directory” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.2.1

  • Plugin renamed to Paco Live Search & Directory.
  • Password-protected records are no longer included in the search index or in the results.
  • The search index tables now install correctly on older MySQL and MariaDB versions.
  • Translations are now loaded from translate.wordpress.org.

0.2.0

  • New hooks for developers: value HTML, filter option labels, container and card classes, card content and result ordering.
  • The colours of the search box border and of the button text now use CSS variables.
  • Removed an unused duplicate file.

0.1.3

  • Units: optional prefix and suffix for fields (for example € or m²).
  • Min/Max range filters, filters limited to the selected category.
  • “Back to results” link on the record page.
  • Fixes and performance improvements.

0.1.0

  • First public version.