PHPackages                             valu/wp-valu-search - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. valu/wp-valu-search

ActiveWordpress-plugin

valu/wp-valu-search
===================

WordPress plugin for Valu Search

0.8.0(4y ago)285.0k↓33.8%GPL-3.0-or-laterPHP

Since Sep 19Pushed 2y ago3 watchersCompare

[ Source](https://github.com/valu-digital/wp-valu-search)[ Packagist](https://packagist.org/packages/valu/wp-valu-search)[ RSS](/packages/valu-wp-valu-search/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (26)Used By (0)

🚨 This plugin has been deprecated. Please move the to Findkit plugin as soon as possible.

Valu Search for WordPress
=========================

[](#valu-search-for-wordpress)

WordPress plugin for [Valu Search](https://search.valu.pro).

This plugin has two features

- Instructs the Valu Search Crawler on how to crawl and scrape the site
- Sends [live updates](#live-updates) to the Valu Search Index as content creators add, update and delete pages

This plugin does not provide any UI. It just exposes some config options and filters for developers.

Installation
------------

[](#installation)

It's on [Packagist](https://packagist.org/packages/valu/wp-valu-search)

```
composer require valu/wp-valu-search

```

If not using composer download a .zip from the [releases](https://github.com/valu-digital/wp-valu-search/releases) page and extract it to `wp-content/plugins`.

Hacking
-------

[](#hacking)

The plugin adds a script tag to pages on your site.

If you wish to test the plugin behaviour on your site after installing it, simply refresh page, and look for script tag with `id="valu-search"`.

Live Updates
------------

[](#live-updates)

Live updates are sent optimistically whenever the plugin thinks the content might have changed on a page. The cloud backend then does a scraping request on the page to determine what the update actually was (add, update, delete) if any.

To enable the real time updates add provided credentials to the wp-config:

```
define("VALU_SEARCH_USERNAME", "username");
define("VALU_SEARCH_API_SECRET", "****"); // Used to be called VALU_SEARCH_UPDATE_API_KEY
define("VALU_SEARCH_ENABLE_LIVE_UPDATES", true);
```

There's a filter for controlling the update process.

In the event of changing posts/pages permalink the new url gets indexed, but the old url remains in the index until the next full site crawl.

```
/old-url --> /new-url // new url is indexed

```

In the event that the changed page was of a hierarchical post type, only the updated page gets reindexed. Other pages that depend on slug of the changed page, eg. child pages get updated during next full crawl.

```
/old-url --> /new-url // new-url is indexed
/old-url/sub-page --> /new-url/sub-page // new-url/sub-page is not indexed.

```

JWT Authentication
==================

[](#jwt-authentication)

The search endpoint access can be limited using a JWT authentication. This plugin can automatically generate JWT tokens for the `@valu/react-valu-search` package.

The token are generated only for logged in users but it can be customized with `valu_search_allow_search_jwt` filter.

Add this to `wp-config.php` to enable it:

```
define("VALU_SEARCH_API_SECRET", "****");
define("VALU_SEARCH_AUTHENTICATED_SEARCH", true);
```

This feature requires [PHP-JWT](https://github.com/firebase/php-jwt) to be installed.

Filters
-------

[](#filters)

### `valu_search_content_selector`

[](#valu_search_content_selector)

Parameters

- `$selector` (string) CSS selector for picking the content elements
- `$post` (WP\_Post) the post of the page being indexed

Multiple selectors can be separated by comma. Ex. `.content,.main`

### `valu_search_no_highlight_content_selector`

[](#valu_search_no_highlight_content_selector)

Parameters

- `$selector` (string) CSS selector for picking the content elements
- `$post` (WP\_Post) the post of the page being indexed

Multiple selectors can be separated by comma. Ex. `.content,.main`

Matching html content is indexed separately from previous `valu_search_content_selector`. Content is not highlighted in the search ui, but behaves exactly like other content including being searchable and language analyzed.

### `valu_search_cleanup_selector`

[](#valu_search_cleanup_selector)

Parameters

- `$selector` (string) CSS selector for removing elements
- `$post` (WP\_Post) The post of the page being indexed

Remove content from selected elements.

### `valu_search_show_in_search`

[](#valu_search_show_in_search)

Parameters

- `$show` (boolean) whether to index the page at all
- `$post` (WP\_Post) the post of the page being indexed

`$show` is false if post status is not public OR if the post is archive.

### `valu_search_title`

[](#valu_search_title)

Parameters

- `$title`(string) if the post being indexed is archive, the archive title otherwise the post title
- `$post` (WP\_Post) the post of the page being indexed

By default HTML entities in `$title` are decoded using [html\_entity\_decode](https://www.php.net/manual/en/function.html-entity-decode.php). To use HTML entities in titles filter `$title` through [htmlentities](https://www.php.net/manual/en/function.htmlentities.php).

### `valu_search_created`

[](#valu_search_created)

Parameters

- `$created` (date) the created date of page being indexed
- `$post` (WP\_Post) the post of the page being indexed

### `valu_search_modified`

[](#valu_search_modified)

Parameters

- `$modified` (date) the modified date of page being indexed
- `$post` (WP\_Post) the post of the page being indexed

### `valu_search_tags`

[](#valu_search_tags)

Parameters

- `$tags` (string\[\]) Array of tags
- `$post` (WP\_Post) the post of the page being indexed

List of tags the page gets indexed with. By default the post type, taxonomy terms, static `wordpress` and `public` / `private` tags are added. These tags can be used to build custom filtering UIs.

#### `valu_search_custom_fields`

[](#valu_search_custom_fields)

Parameters

- `$custom_fields_associative_array` (array("keyword"=&gt;\[\], "date"=&gt;\[\], "number"=&gt;\[\]);) Associative array containing all custom fields associative arrays
- `$post` (WP\_Post) the post of the page being indexed

Custom fields related to the page.

#### `valu_search_custom_fields_date`

[](#valu_search_custom_fields_date)

Parameters

- `$custom_fields_date_associative_array` (\[\]) Associative\_array containing custom date field key value pairs
- `$post` (WP\_Post) the post of the page being indexed

Custom date fields related to the page. e.g. eventStart, eventEnd

##### `valu_search_custom_fields_keyword`

[](#valu_search_custom_fields_keyword)

Parameters

- `$custom_fields_keyword_associative_array` (\[\]) Associative\_array containing custom keyword field key value pairs
- `$post` (WP\_Post) the post of the page being indexed

Custom keyword fields related to the page. e.g. productPreview, productId

##### `valu_search_custom_fields_number`

[](#valu_search_custom_fields_number)

Parameters

- `$custom_fields_number_associative_array` (\[\]) Associative\_array containing custom keyword field key value pairs
- `$post` (WP\_Post) the post of the page being indexed

Custom number fields related to the page. e.g. productPrice

#### `valu_search_superwords`

[](#valu_search_superwords)

Parameters

- `$superwords`(string\[\]) Array of superwords
- `$post` (WP\_Post) the post of the page being indexed

List of superwords indexed with the page. By default empty array. Superwords can be used to mark page as an important search result for the superwords given. Search results with matching superwords are shown first in results.

### `valu_search_page_meta`

[](#valu_search_page_meta)

- `$meta` (assoc array)
- `$post` (WP\_Post) the post of the page being indexed

The full data rendered to the meta tag.

See all available fields on

### `valu_search_site_meta`

[](#valu_search_site_meta)

- `$meta` (assoc array)
- `$post` (WP\_Post) the post of the page being indexed

Global options for the crawler exposed on `yoursite.example/valu-search.json`.

See all available fields on

### `valu_search_should_update`

[](#valu_search_should_update)

Parameters

- `$should_update` (boolean) defaults to value of `php_sapi_name() !== 'cli'`
- `$post` (WP\_Post) the post of the page being updated

Return false to prevent the page from being updated.

### 'valu\_search\_show\_admin\_notices'

[](#valu_search_show_admin_notices)

- `$show_notices` (boolean) defaults to false

Return true to enable notices about live updates in wp-admin

Actions
-------

[](#actions)

### 'valu\_search\_live\_update\_result'

[](#valu_search_live_update_result)

Action is fired everytime live update request is done

- `$response` return type of `wp_remote_request()` (array|WP\_Error)

API
---

[](#api)

### `\ValuSearch\enqueue_live_update(\WP_Post $post)`

[](#valusearchenqueue_live_updatewp_post-post)

Enqueues a post live update to be sent at the end of the WordPress request in the `shutdown` action. Can be called multiple times and the update will be batched.

### `\ValuSearch\live_update(array $posts)`

[](#valusearchlive_updatearray-posts)

Immediately live update the given posts.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~45 days

Recently: every ~73 days

Total

21

Last Release

1516d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62e64ab16d2c22b2d02dd123a85135093821bc9f7f3619f38c84227ed93427af?d=identicon)[valu](/maintainers/valu)

---

Top Contributors

[![esamattis](https://avatars.githubusercontent.com/u/225712?v=4)](https://github.com/esamattis "esamattis (95 commits)")[![JoonasVaris](https://avatars.githubusercontent.com/u/53940550?v=4)](https://github.com/JoonasVaris "JoonasVaris (9 commits)")[![mTanskanen](https://avatars.githubusercontent.com/u/77783046?v=4)](https://github.com/mTanskanen "mTanskanen (2 commits)")

---

Tags

wordpress-plugin

### Embed Badge

![Health badge](/badges/valu-wp-valu-search/health.svg)

```
[![Health](https://phpackages.com/badges/valu-wp-valu-search/health.svg)](https://phpackages.com/packages/valu-wp-valu-search)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[johnbillion/user-switching

Instant switching between user accounts in WordPress and WooCommerce.

19768.3k2](/packages/johnbillion-user-switching)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/user-plugin

User plugin for October CMS

11954.3k13](/packages/rainlab-user-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
