Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Custom field values in Horizontal Results
This topic contains 4 replies, has 2 voices, and was last updated by donlange 4 years, 8 months ago.
- AuthorPosts
- March 20, 2019 at 5:06 pm #21728
Hello Ernest,
Is there a way to include a meta data meta_value in the Horizontal Results?
For example included the property price in the New Listings section on the:
https://chasebrothersland.com home page?
Thank you for your support,
DonMarch 21, 2019 at 3:01 pm #21738Hi Don,
Sure, it works the same way as the vertical results. For more information, check the advanced title and content fields documentation.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 21, 2019 at 8:36 pm #21755That’s a cool feature, Ernest.
However, at what point can I run the meta_value through the PHP number_format() function so I can display these 7+ digit prices with commas as I have done in my WordPress template file?
Thank you,
DonMarch 22, 2019 at 10:01 am #21758Hi Don,
Well, it’s not possible to do that via that feature. You will need a custom code instead. There is knowledge base article here on how to do that.
The number format code should be placed below this line in that code:if ( !empty($meta_value) ) {
..something like:
Best,if ( !empty($meta_value) ) { $meta_value = number_format($meta_value);
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 23, 2019 at 7:55 am #21761Thank you, Ernest… that did the trick!
Regards,
Don - AuthorPosts
You must be logged in to reply to this topic.