Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Show SKU in the results list
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 6 years, 10 months ago.
- AuthorPosts
- October 31, 2017 at 10:29 am #15357
Would you be able to tell me how to add custom fields into the results list. Specifically I am using this as a product search (WooCommerce) and I want to include the SKU in the results.
Thanks!
Attachments:
You must be logged in to view attached files.October 31, 2017 at 6:57 pm #15360Hi!
You are looking for the Advanced content field on the Advanced Options -> Content options panel: https://i.imgur.com/UOegjef.png
This documentation part will clarify almost everything about it’s usage: Advanced title and Description fieldsLong story short, the product SKU is stored within the _sku custom field, and the advanced description field allows displaying custom fields content as well. In your case it would be something like this:
{descriptionfield}<p>{_sku}</p>
..or if you want the SKU text to be bold:
{descriptionfield}<p><strong>{_sku}</strong></p>
.. if the SKU field is not set on every product, then using the conditional brackets will make sure that the paragraph is only displayed is the _sku is set:
{descriptionfield}[<p><strong>{_sku}</strong></p>]
I hope this helps!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 3, 2017 at 2:00 pm #15376That worked – Thanks!
November 3, 2017 at 10:15 pm #15379You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.