> For the complete documentation index, see [llms.txt](https://documentation.ajaxsearchpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ajaxsearchpro.com/getting-started/placing-the-search-shortcode-in-theme-files.md).

# Placing the search shortcode in theme files

*This is for advanced users only. Please consult with the theme developer first, if you intend to edit your theme files.*

You can place the shortcode to any location, but some locations are not available through content or widgets. These are usually the header, footer or the result loop.

To place the shortcode to the theme you need to find the proper location first. If you are not familiar with theme structures, I suggest you consult a developer before editing anything.

After finding the proper location, you need to place the theme shortcodes there. The difference is, that a theme shortcode is actually a PHP code block. You can find these shortcodes on the same place as the regular ones, on the search settings panel:

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

A theme shortcode looks like this:

```
<?php echo do_shortcode('[wpdreams_ajaxsearchpro id=1]'); ?>
```

For example:

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/getting-started/placing-the-search-shortcode-in-theme-files.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.
