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

Search results

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #51251
    PrimeMediaPrimeMedia
    Participant

    Hello 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?

    #51254
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    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.

    #51257
    PrimeMediaPrimeMedia
    Participant

    You cannot access this content.

    #51268
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

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