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

Forum Replies Created

Viewing 15 posts - 166 through 180 (of 18,409 total)
  • Author
    Posts
  • in reply to: Price Filter #57065
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    in reply to: Crawled url’s in Google search console #57060
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    No worries 🙂 It is definitely not Ajax Search Pro causing it, I can confirm that.

    I will close this ticket now as requested.

    in reply to: Question about Results page #57052
    Ernest MarcinkoErnest Marcinko
    Keymaster

    We are working on a complete back-end refactor. It will follow the search statistics UI. With that rework there will be a new way to create filters, that will also include sorting possibilities.

    There is still a way via converting a custom field filter to an ordering filter via a bit of custom code. Follow the steps below:

    1. Create a drop-down custom field filter for a non-existint field custom_order with these values (see this screenshot):

    relevance||Relevance
    date||Publish date
    date_reverse||Publish date descending
    alpha||Alphabetical
    alpha_reverse||Alphabetical descending
    price||Cheapest first
    price_reverse||Most expensive first

    2. Add 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:

    add_filter(
    	'asp_query_args',
    	function ( $args ) {
    		// The values allowed in the the_ordering variable
    		$allowed_orderings = array(
    			'relevance',
    			'id',
    			'id_reverse',
    			'date',
    			'date_reverse',
    			'alpha',
    			'alpha_reverse',
    			'price',
    			'price_reverse',
    		);
    
    		$ordering = '';
    
    		foreach ( $args['post_meta_filter'] as $k => $filter ) {
    			if ( $filter['key'] === 'custom_order' ) {
    				$ordering = $filter['value'];
    				unset( $args['post_meta_filter'][$k] );
    			}
    		}
    
    		if ( $ordering === '' || !in_array($ordering, $allowed_orderings, true) ) {
    			return $args;
    		}
    
    		switch ( $ordering ) {
    			case 'id':
    				$args['post_primary_order'] = 'id DESC';
    				break;
    			case 'id_reverse':
    				$args['post_primary_order'] = 'id ASC';
    				break;
    			case 'date':
    				$args['post_primary_order'] = 'post_date DESC';
    				break;
    			case 'date_reverse':
    				$args['post_primary_order'] = 'post_date ASC';
    				break;
    			case 'alpha':
    				$args['post_primary_order'] = 'post_title ASC';
    				break;
    			case 'alpha_reverse':
    				$args['post_primary_order'] = 'post_title DESC';
    				break;
    			case 'price':
    				$args['post_primary_order']          = 'customfp ASC';
    				$args['post_primary_order_metatype'] = 'numeric';
    				$args['_post_primary_order_metakey'] = '_price';
    				break;
    			case 'price_reverse':
    				$args['post_primary_order']          = 'customfp DESC';
    				$args['post_primary_order_metatype'] = 'numeric';
    				$args['_post_primary_order_metakey'] = '_price';
    				break;
    			case 'relevance':
    			default:
    				$args['post_primary_order'] = 'relevance DESC';
    				break;
    		}
    
    		return $args;
    	}
    );

    This will convert the custom field filter into a sorting filter.

    in reply to: Price Filter #57051
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    in reply to: Question about Results page #57048
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    can you guide me in the right direction to adding sort to this page?

    I’m afraid a sorting filter is not yet possible via Ajax Search Pro. You can set the results primary and the secondary sorting on the back-end, but there is no filter for it yet for the front-end.

    Also search number, having issues showing how many results based on search

    I assume you mean this number? That shows the remaining results (as it is used with the load-more results feature), not the total results count. While it can’t be changed, it is possible to disable it with a few lines of custom CSS code:

    .asp_showmore span {
       display: none !important;
    }
    in reply to: Question about Results page #57045
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Ross,

    It does that automatically, whenever the integration is enabled.

    For example, if I search for “test”, then I get these page results in the drop-down. When I hit enter, I get redirected, and the results are the same on the results page.

    Some differences can be expected, usually when a non-post type is returned in the drop-down, or if a post type is not fully supported in the grid, but generally it should be very similar.

    in reply to: Question about Results page #57043
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Ross,

    Thank you very much for your kind words, I really appreciate it!

    You are looking for the loop grid integration feature, but as I was checking the results page I see that you have already successfully connected the search to the Loop Grid.

    in reply to: Selected items on initial load, large loader #57038
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I’m afraid selecting the items manually is not possible – the only possiblities are either newest, random or results for a search phrase.

    It is however possible to enable a loader in the results area, you can do that here.

    in reply to: Price Filter #57037
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    in reply to: Word logged twice in statistics #57033
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    in reply to: Help on Rules AND Question on Order of Filter #57030
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    in reply to: Category search setup #57028
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Okay, I see. So these filters are to narrow down existing results. If you also want to search items by category titles, you have to enable this option, that will do the trick.

    in reply to: Search Results For Taxonomy Terms #57017
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Sure! Thank you for the details.

    So, what you want is not this, make sure to turn that off. That is to return taxonomy terms as results, and you want the products by taxonomy terms.
    For that just enable this option, it will do exactly what you expect.

    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 15 posts - 166 through 180 (of 18,409 total)