> For the complete documentation index, see [llms.txt](https://ce-docs.keywordrush.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ce-docs.keywordrush.com/frontend/frontendsearch.md).

# Frontend Search

With Content Egg, you can add each deal as a separate post. WordPress searches by post titles, but if you want a search form that shows results from affiliate networks directly (without creating posts for each deal), you can use Content Egg's Frontend Search function.

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

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

You need to create two things: a page with the search form (or widget) and a page for displaying the results.

### Creating a Search Form

There are several ways to show the affiliate search form with Content Egg:

1. **Using a Widget**:
   * Find the widget **CE: Product Search** in **Appearance – Widgets**.
   * Place the widget in a sidebar. It will have the same styling as a standard WordPress widget.
2. **Using a Shortcode**:
   * Use the shortcode `[content-egg-search-form]`.
   * This shortcode will generate a standard WordPress search form and direct users to a special page with results from affiliate modules instead of the default WordPress search page.
   * The shortcode design matches the standard WordPress search form.

Please note, some themes can extend the Content Egg search form. For example, Rehub offers additional shortcodes.

#### Search Settings

The next step is to set up the page for output results. To do this:

1. Go to **Content Egg – Settings – General**.
2. Add the output shortcode to the text area labeled **Search page template**.

We recommend using common Content Egg shortcodes. For example:

```
[content-egg-block template=offers_list]
```

![](/files/-M529PZwlI3QJk8ae50S)

### Customization

To configure the search form, create a `ce-product-searchform.php` file in the root directory of your theme (or child theme). Add and customize the form code:

```php
<form role="search" method="get" class="search-form" action="<?php echo esc_attr(\ContentEgg\application\ProductSearchWidget::getSearchFormUri()); ?>">
      <input type="text" name="s" placeholder="Product search...">
      <button type="submit">Search</button>
</form>
```

To configure the global page template with a search result, create a `ce-product-search.php` file in the root directory of your theme (or child theme). Use code similar to the code in your `page.php` template.

To configure `product-search` in the URL search form, use a filter that returns a new slug:

```php
add_filter('cegg_product_search_slug', 'example_callback');
```
