Get formatted price in result title or in content
WooCommerce - Get formatted price in result title or in content
The plugin allows displaying custom field contents within results, it also recognizes the WooCommerce price custom field, and prints the formatted price as result.
These fields allow displaying custom field values, such as the WooCommerce price ‘_price’ field to display the product price. For example, inputting:
1
{titlefield}[ - Price: {_price}]
Copied!
..into the title field, will result in:
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:
1
{titlefield}[ - Now only: {_sale_price} instead of][ - {_regular_price}]
Copied!
..which results in:
For more examples & to learn more about the advanced title and content fields, please check the following resources:
Last modified 1yr ago
Copy link