Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search results
- This topic has 3 replies, 2 voices, and was last updated 1 year, 8 months ago by
Ernest Marcinko.
-
AuthorPosts
-
October 3, 2024 at 1:59 pm #51251
PrimeMedia
ParticipantHello Ernest,
I am a new user and i have some questions:
1: I have a custom field with city names, each city name seperated with a comma. In the settings of the form i selected to only search in that custom field. It does show the city names from the custom field, which is good, but it also shows all other city names in that same custom field, which is bad. How can i achieve to only show the matching city name. Check attachment what i mean.
2: I also want the results to be ont column, not three (but this is not that important for now)
3: your “buy now” button on the website goes to a dead link, so doesnt work. So i purchased it directly from Envato. I still have the lifetime updates, right?
October 3, 2024 at 4:09 pm #51254Ernest Marcinko
KeymasterHi,
1. I’m not sure if this is possible without major customizations. The advanced title/content field feature is to display the whole custom field value. However I can try suggesting a custom code to “find” the closest matching line and trim the title accordingly:
add_filter( 'asp_results', function ( $results, $id, $is_ajax, $args ) { foreach ( $results as $r ) { $s = str_replace(array( "\r", "\n" ), '', $r->title); $s = explode(',', $s); $s = array_filter( $s, function ( $city ) use ( $args ) { return str_contains($city, $args['s']); } ); if ( isset($s[0]) ) { $r->title = $s[0]; } } return $results; }, 10, 4 );Try adding this code via the Code Snippets plugin or to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
2. I recommend switching to a vertical theme: https://i.imgur.com/mlCYfDC.png
There should be vertical version of the same layout you are using right now.3. Yes that is correct, Envato market is our only seller platform. Can you please tell me which page are you experiencing that dead link as well as which browser? I have tried a few pages on the website but every time I’m correctly redirected to Envato Market on a new tab. I will keep testing until then.
October 3, 2024 at 4:38 pm #51257PrimeMedia
ParticipantYou cannot access this content.
October 4, 2024 at 7:16 am #51268Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- You must be logged in to reply to this topic.