This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Return result field option

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

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #14849
    NikoNiko
    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 MarcinkoErnest 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.

    #14867
    NikoNiko
    Participant

    You cannot access this content.

    #14889
    Ernest MarcinkoErnest 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.

    #14891
    NikoNiko
    Participant

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

    thank you

    #14896
    Ernest MarcinkoErnest 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

    #14899
    NikoNiko
    Participant

    Thank you very much

    #14900
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.