Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterThanks!
Luckily it is not coming from the search plugin. There is this 3rd party CSS rule, which resets the background image on all elements of items which are placed in a container, which have the “e-con” and “e-parent” CSS classes. If I turn them off in the debugger, the issue is gone.
It seems to be related to a lazy loader of some sort.
December 11, 2024 at 12:32 pm in reply to: Fetching a URL parameter from within an asp_query_args callback function #52241Ernest Marcinko
KeymasterThe core is almost correct, this is the one you are looking for:
$args['post_primary_order'] = "customfp DESC"; $args['_post_primary_order_metakey'] = "evcal_srow"; $args['post_primary_order_metatype'] = "numeric"; // "string" or "numeric"Ernest Marcinko
KeymasterI’m sorry, the video didn’t came through because of it’s size. Can you try to upload it to youtube or somewhere? Thank you!
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi Camille,
On my end everything looks the same as on the back-end preview window. You may have to only clear the cache to see the changes.
To redirect the results on magnifier/enter key, make sure to change these settings: https://i.imgur.com/QtrJVv5.png
Ernest Marcinko
KeymasterHi,
You only need to switch this option, and it will likely resolve the problem. The issue is unfortuantely not caused by our plugin as I mentioned in my previous reply, however that option may prevent the incorrect stylesheet loading caused by your cache plugin or CDN.
You can of course open a refund request, if you purchased within 7 days it will surely be approved.
Ernest Marcinko
KeymasterHi,
This is called the FOUC phenomenon, and it happens when critical assets are delayed from the page load. It usually happens a minify/cache plugin is used and it’s accidentally configured to asynchronously load all javascrip and stylesheets. In case you use anything like that, make sure to turn off async asset loading – those I only recommend using if you know how to extract critical CSS, and that’s not easy to do.
If that does not work or you don’t use anything like that, then can you please change these two options: https://i.imgur.com/d7razwI.png
These should resolve any output buffer related issues causing the FOUC.Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterI don’t think you can combine the two without custom coding, unless the woodmart theme has some sort of a container where the fullscreen search input can be replaced.
Try looking through the theme settings, if there is any option to replace the fullscreen search form, then you could use the shortcode from Ajax Search Pro there.Ernest Marcinko
KeymasterYou are very welcome!
Ernest Marcinko
KeymasterThat is actually perfect in my opninion. I was going to suggest the results templating as well, so this is definitely a very good solution.
Ernest Marcinko
KeymasterI don’t think it should be an issue. Primary and sub categories are equally treated in wordpress.
If you have an item which belongs to a sub-category, it should be tagged with the primary category as well, it’s generally a good practice.
-
This reply was modified 1 year, 6 months ago by
Ernest Marcinko.
Ernest Marcinko
KeymasterHi!
I logged in to check the configuration, but everything seems to be okay. I tried the filter, and it seems to be returning the correct results: https://i.imgur.com/enoyu77.png
On your events page, you seem to be trying to filter a custom widget, which is not possible. Currently the posts, products and the loop grid elements are supported with Elementor.
December 10, 2024 at 9:29 am in reply to: Fetching a URL parameter from within an asp_query_args callback function #52211Ernest Marcinko
KeymasterHi,
The problem is that this is an ajax request, not the page rendering request. That query parameter does not exist in that context. When the live search request is sent, it goes to
admin-ajax.phphandler, and at that context, that is the request itself.This means, that if you want to change something based on the query variable, it has to be sent along with this ajax request as well. This is doable in a different way, by adding a variable to the form via a hook and using that in the
asp_query_argsduring the ajax request later on.I made a quick custom code to show you how to handle that. I assumed there is a $_GET query argument ‘event_mode’, so based on that:
/** * First, you need to add a new variable to the form, that is later sent * with the ajax search request. */ add_action('asp_layout_in_form', function () { $event_mode = $_GET['event_mode'] ?? 'past'; ?> <input type="hidden" name="asp_event_mode" value="<?php echo esc_attr($event_mode); ?>"> <?php }); /** * The variable from the code above is sent with the $options['asp_event_mode'] in * the ajax request, so you need to check that. */ add_filter('asp_query_args', function ( $args, $search_id, $options ) { if ( isset($options['asp_event_mode']) ) { $filter_operator = $options['asp_event_mode'] === 'past' ? '<=' : '>='; if ( $search_id == 2 ) { $args['post_meta_filter'][] = array( 'key' => 'evcal_srow', 'value' => time(), 'operator' => $filter_operator, 'allow_missing' => false, ); } } return $args; }, 10, 3);This may not be the solution, you may have to adjust it a bit, but it should be very close to it.
Ernest Marcinko
KeymasterHi,
I assume the full screen search is custom coded in some way, or it may use the output from the theme search.php file.
I think the best solution is to turn the automatic search replacement off, and instead use the ajax search pro shortcode directly in the Woodmart header, instead of the search module for desktop.
I believe their header builder has shortcode support via text/HTML modules and you can still keep their search module on the mobile view, only replacing the desktop search. -
This reply was modified 1 year, 6 months ago by
-
AuthorPosts