Custom field values in Horizontal Results

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

 
Participant
2 years, 10 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #21728

    Participant

    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,
    Don

    #21738

    Hi 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 :)


    #21755

    Participant

    That’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,
    Don

    #21758

    Hi 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:

    if ( !empty($meta_value) ) {
        $meta_value = number_format($meta_value);
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21761

    Participant

    Thank you, Ernest… that did the trick!

    Regards,
    Don

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.