> For the complete documentation index, see [llms.txt](https://ae-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://ae-docs.keywordrush.com/displaying-products/customtemplates.md).

# Custom output templates

You can create your own templates for your storefronts. Don't edit the built-in templates — your changes would be lost when the plugin updates.

{% hint style="info" %}
Custom templates are PHP files — creating one takes some basic PHP knowledge. The easiest start is to copy a default template and adjust it.
{% endhint %}

First, create the following directory:

`wp-content/affegg-templates`

To get started quickly, you can copy one of the default templates as a base.

Default templates are located in `wp-content/plugins/affiliate-egg/templates`.

Template files must be named with the prefix `egg_`.

Each template file must begin with a PHP comment that defines its name, for example:

```php
/*
Name: Simple
*/
```

{% hint style="warning" %}
Make sure your editor uses UTF-8 encoding when editing template files.
{% endhint %}

## Using the built-in styles

Affiliate Egg's CSS isn't loaded just because your template renders — a template pulls in its own styles by calling one of these on the **first line**:

```php
<?php $this->enqueueModernStyle(); ?>   // modern styling (affegg-modern.css)
<?php $this->enqueueStyle(); ?>         // legacy styling (Bootstrap 3 + products.css)
```

If you **copy a default template as a base**, that call is already there — so the built-in styling loads and you can just tweak the markup and CSS classes. Keep the line if you want to build on the default look and only customise the layout.

If you **start from scratch** and leave both calls out, no plugin CSS is loaded, and your template is styled entirely by your theme or your own CSS — handy when you want full control.
