Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterSure! You can try this:
add_filter('asp_query_args', function ( $args, $search_id, $options ) { $args['post_meta_filter'][] = array( 'key' => 'expiration_date', 'value' => time(), 'operator' => '>', 'allow_missing' => true, ); return $args; }, 10, 3);You can set the ‘allow_missing’ to false if you want to exclude items where the expiration_date field does not exist 🙂
Ernest Marcinko
KeymasterMy mistake – I completely missunderstood your query here. I thought that the field was something different, I’m very sorry.
In this case it is possible, but instead of the hidden filter, you will need to use a datepicker filter, so this configuration: https://i.imgur.com/VDLd5pB.png
Don’t worry, the filter does not have to be visible, it will still work. This should do the trick, if the field is indeed a timestamp.
Ernest Marcinko
KeymasterSure!
You can enable searching by categories (including product categories) via this option. If you want, you can also choose to search by product SKU as well.
Ernest Marcinko
KeymasterIt shouldn’t make a difference. If the field value is indeed a timestamp (number), then it should be just fine. What exactly happens, you get no results after adding the filter?
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterIf the operator (6) is set to “MORE THEN”, then it should be okay, as it checks if the value is above 0 – so make sure that is set correctly, it’s very important.
Ernest Marcinko
KeymasterSure!
You can change those here: https://i.imgur.com/9s3iXyv.png
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi Gavin,
I assume you mean singular/plural keyword difference in this case? (laptop/laptops)
If the keyword “laptops” is not within the selected fields, then it’s not matching for that reason. In the upcoming release there will be an automated singularization/pluralization feature for the English language, it’s under testing.Currently it is still possible via a bit of custom code from this knowledge base. If you want I can set it up for you, all I need is temporary back-end and possibly FTP access.
January 21, 2025 at 12:40 pm in reply to: New pages from sub site are not showng up in the search #52560Ernest Marcinko
KeymasterYou cannot access this content.
January 21, 2025 at 8:27 am in reply to: New pages from sub site are not showng up in the search #52557Ernest Marcinko
KeymasterYou cannot access this content.
January 20, 2025 at 4:56 pm in reply to: New pages from sub site are not showng up in the search #52554Ernest Marcinko
KeymasterYou cannot access this content.
January 20, 2025 at 4:00 pm in reply to: New pages from sub site are not showng up in the search #52552Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts