# Return/Enter key and Magnifier icon click actions

`Search Behavior -> Magnifier and Return Actions`

<figure><img src="/files/twQyWjODSelwsfM7f2zJ" alt=""><figcaption></figcaption></figure>

These settings control what happens when the user clicks the search bar magnifier icon or hits the enter key on the keyboard.

## Redirection

![](http://i.imgur.com/gi5nxbT.png)

These option will allow you to either:

* Redirect when clicking on search icon
* Redirect when hitting the return key

It is possible to redirect either to the default

* Results page or WooCommerce results page&#x20;
* First Matching result
* Custom URL

### How to disable results page archive on enter or return key, and do live search only

Do do that, make sure to set both the magnifier and return key actions to **Trigger Live search** or **Do nothing** values.

<figure><img src="/files/dkLc3TVElfhbZAudtUFH" alt=""><figcaption></figcaption></figure>

## Redirection to custom URL

In case you have a different search template or using permalinks, you can change the redirection URL with this option.

The default value should work with all themes though.

The **{phrase}** variable is always replaced with the actual search phrase.

This is also a great option to add additional parameters to the redirection. For example if you want to redirect to the WooCommerce product results page, you should change it to "?s={phrase}\&post\_type=product" like so:

![](http://i.imgur.com/whw0oq5.png)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.ajaxsearchpro.com/behavior/return-key-and-magnifier-icon-click-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
