# Get formatted price in result title or in content

&#x20;The plugin allows displaying custom field contents within results, it also recognizes the WooCommerce price custom field, and prints the formatted price as result.

![](https://i.imgur.com/Mchf9c0.png)

These fields allow displaying custom field values, such as the WooCommerce price ‘\_price’ field to display the product price. For example, inputting:

```
{titlefield}[ - Price: {_price}]
```

..into the title field, will result in:

![](https://i.imgur.com/2CTEob9.png)

In case of WooCommerce, the following custom fields can be used for price display:

* \_price
* \_price\_html
* \_tax\_price
* \_regular\_price
* \_sale\_price

For example, you can combine the \_regular\_price and \_sale\_price to display a sale:

```
{titlefield}[ - Now only: {_sale_price} instead of][ - {_regular_price}]
```

..which results in:

![](https://i.imgur.com/ds9ZDzx.png)

For more examples & to learn more about the advanced title and content fields, please check the following resources:

* [Documentation: Advanced title & Content fields](https://wpdreams.gitbooks.io/ajax-search-pro-documentation/content/advanced/advanced_title_and_description_fields.html)


---

# 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://knowledgebase.ajaxsearchpro.com/miscellaneous/woocommerce/get-formatted-price-in-result-title-or-in-content.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.
