soderlind / wp-loupe

WP Loupe is a plugin for WordPress that significantly improves the search capabilities of your website
GNU General Public License v3.0
47 stars 0 forks source link
search-engine searching wordpress-plugin

WP Loupe Plugin

Features | Installation | Usage | Filters | Acknowledgements | License

Overview

WP Loupe is a plugin for WordPress that significantly improves the search capabilities of your website. It leverages a custom search index to deliver quick and precise search results.

WP Loupe employs the Loupe search engine to construct a search index for your posts and pages. The search index is stored in a SQLite database, which is automatically updated when a post or page is created or updated.

Key Features

(This is my to-do list, not all features are implemented yet)

Installation Methods

The wp-loupe.zip file can be found in the "Assets" section of the latest release.

After installation, activate the plugin and navigate to Settings > WP Loupe to reindex all posts and pages.

How to Use

Filters

  1. wp_loupe_db_path: This filter allows you to change the path where the Loupe database files are stored. By default, it's in the WP_CONTENT_DIR .'/wp-loupe-db' directory.
add_filter( 'wp_loupe_db_path', WP_CONTENT_DIR . '/my-path' );
  1. wp_loupe_post_types: This filter allows you to modify the array of post types that the WP Loupe plugin works with. By default, it includes 'post' and 'page'.
add_filter( 'wp_loupe_post_types', [ 'post', 'page', 'book' ] );
  1. wp_loupe_filterable_attribute_{$post_type}: This dynamic filter allows you to modify the array of filterable attributes for each post type. By default, it includes 'title' and 'content'.
add_filter( "wp_loupe_filterable_attribute_book", [ 'title', 'author', 'isbn' ] );

Acknowledgements

WP Loupe is built upon Loupe. Loupe is licensed under the MIT license.

Copyright and License

WP Loupe is copyright © 2024 Per Søderlind.

WP Loupe is open-source software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

WP Loupe is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE for more information.