Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Return result field option
- This topic has 7 replies, 2 voices, and was last updated 8 years, 8 months ago by
Ernest Marcinko.
-
AuthorPosts
-
September 22, 2017 at 2:10 pm #14849
Niko
ParticipantI 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
September 25, 2017 at 10:41 am #14861Ernest Marcinko
KeymasterHi 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.
September 25, 2017 at 11:21 am #14867Niko
ParticipantYou cannot access this content.
September 26, 2017 at 8:40 am #14889Ernest Marcinko
KeymasterHi,
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.
September 26, 2017 at 10:45 am #14891Niko
Participanthi
this is the page of the plug in https://fr.wordpress.org/plugins/wp-postratings/thank you
September 26, 2017 at 3:01 pm #14896Ernest Marcinko
KeymasterHi,
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
September 26, 2017 at 3:06 pm #14899Niko
ParticipantThank you very much
September 26, 2017 at 3:52 pm #14900Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- You must be logged in to reply to this topic.