# Wordpress Search Action

This action will use the standard Wordpress search API to search for different terms and display the results as chat text or as a carousel.

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/vXwUwvgzBVtqkRuNLePX/image.png)

### Settings

The action uses the following settings:

| Setting           | Description                                                                  | [Parsed](https://docs.mylinkconnect.com/actions-and-operations/dynamic-parsing) |
| ----------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Base URL          | The base url of your Wordpress website. Like <https://www.mysite.com>.       | :white\_check\_mark:                                                            |
| Consumer Key      | If required by your Wordpress configuration, paste here the consumer key.    | :white\_check\_mark:                                                            |
| Consumer Secret   | If required by your Wordpress configuration, paste here the consumer secret. | :white\_check\_mark:                                                            |
| Search Terms      | The terms you want to use to search your website                             | :white\_check\_mark:                                                            |
| No Results Text   | The text you wish to display whenever the search yields no results           | :white\_check\_mark:                                                            |
| Max Results Count | The maximum number of items to be returned by the search                     | :white\_check\_mark:                                                            |
| Display Mode      | The action used by Connect to render the search results.                     | :no\_entry:                                                                     |

### Remarks

By default a Wordpress website may not have standard REST API enabled for searching. If you use this action on a website without REST API, it will fail.

Depending on your Wordpress version REST API enabling steps may vary. [This guide can help you](https://developer.wordpress.org/rest-api/) in setting up and configure your Wordpress website for search.

### Trigger

This action does not trigger any event.

### Variables

This action produces the following variables:

| Variable          | Description                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------------ |
| wp\_search\_count | The total number of items found. The number may be lower but never higher than Max Results Count |

### Availability

Channel specific availability follows the table below:

| Channel          | Availability     |
| ---------------- | ---------------- |
| Facebook         | Fully Available. |
| WhatsApp         | Fully Available. |
| Telegram         | Fully Available. |
| Web              | Fully Available. |
| Alexa            | Fully Available. |
| Google Assistant | Fully Available. |
| Slack            | Fully Available. |
| API              | Fully Available. |

This action can be used only inside interactions and not as child of other actions. This action requires a [Premium Account](https://docs.mylinkconnect.com/basic-concepts/your-account/upgrading-from-free) to be used on a live chatbot.
