Return result field option

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Return result field option

This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 9 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #14849
    Niko
    Niko
    Participant

    I need to setup a return option based on type of customer and show one field in the result window can you tell me how to do it thank you.

    exemple Mickaël is a paid customer I need to show him in first position but if there s only free customers I show the free in mixed order never the same.

    Second thing the result show the picture the nam and information of the customer but can I add another field like rating stars in it ? if yes how

    thank you for your fast and effective support.

    Nicolas

    #14861
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Nicolas,

    It depends on how the customers are stored (users, custom post type etc..) and as well as how the information about their status (free, paying) is stored as well.
    If for example the customers are post types and the customer status is stored in a custom field, then this might be easily solvable by changing the ordering based on the custom field.

    To add additional data to the results, a custom code will be needed for sure, especially in case of complex things as star ratings. I’m not sure if that is actually possible. Here is a knowledge base about result templating which allows making direct changes to the result layout files. A custom filter code might also work.

    Best,
    Ernest Marcinko

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


    #14867
    Niko
    Niko
    Participant
    You cannot access this content.
    #14889
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Is the ratings shortcode from a specific plugin? If yes, let me know, and I will try to test it out on my local environment, and will let you know if there is any way to do it.

    Best,
    Ernest Marcinko

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


    #14891
    Niko
    Niko
    Participant

    hi
    this is the page of the plug in https://fr.wordpress.org/plugins/wp-postratings/

    thank you

    #14896
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    It looks like that is possible, with a small custom code.

    Add this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    This results in: https://i.imgur.com/XFxXvk1.png

    Best,
    Ernest Marcinko

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


    #14899
    Niko
    Niko
    Participant

    Thank you very much

    #14900
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.