> For the complete documentation index, see [llms.txt](https://wplake.gitbook.io/advanced-views/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wplake.gitbook.io/advanced-views/post-selections/code-fields/custom-template.md).

# Custom Selection Template

Advanced Views **automatically** generates a default template for any *Post Selection*. It includes the loop to display the query results and may include a "No posts found" conditional message or pagination elements, depending on the *Post Selection* settings.

*Post Selection* templates support arbitrary logic, allowing you to perform operations such as formatting output or calling any WordPress function directly within the template.

{% hint style="success" %}
By copying the **Default Template** into the **Custom Template** field, you are getting complete control over the markup.
{% endhint %}

## 1. How to customize *Post Selection* template

{% hint style="info" %}
Both *Default Template* and *Custom Template* fields are smart templates that use one of the [built-in template engines](/advanced-views/features/smart-templates.md).&#x20;
{% endhint %}

1. Go to **Edit** your *Post Selection.*
2. Switch to the *Template* tab.
3. **Select** the *Default Template* code and **copy it**.
4. Paste the code in the *Custom Template* field.
5. Edit the markup as needed.
6. Click on **Update** to save your *Post Selection*.

{% hint style="warning" %}
If you have made changes to your *Post Selection*, remember to click **Update** to ensure that you have the latest template before editing.
{% endhint %}
